mirror of
https://github.com/LCTT/TranslateProject.git
synced 2026-08-23 04:03:29 +08:00
@@ -0,0 +1,52 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Head to the arcade in your Linux terminal with this Pac-man clone)
|
||||
[#]: via: (https://opensource.com/article/18/12/linux-toy-myman)
|
||||
[#]: author: (Jason Baker https://opensource.com/users/jason-baker)
|
||||
|
||||
Head to the arcade in your Linux terminal with this Pac-man clone
|
||||
======
|
||||
Want to recreate the magic of your favorite arcade game? Today's command-line toy will transport you back in time.
|
||||

|
||||
|
||||
Welcome back to another day of the Linux command-line toys advent calendar. If this is your first visit to the series, you might be asking yourself what command-line toys are all about. Basically, they're games and simple diversions that help you have fun at the terminal.
|
||||
|
||||
Some are new, and some are old classics. We hope you enjoy.
|
||||
|
||||
Today's toy, MyMan, is a fun clone of the classic arcade game [Pac-Man][1]. (You didn't think this was going to be about the [similarly-named][2] Linux package manager, did you?) If you're anything like me, you spent more than your fair share of quarters trying to hit a high score Pac-Man back in the day, and still give it a go whenever you get a chance.
|
||||
|
||||
MyMan isn't the only Pac-Man clone for the Linux terminal, but it's the one I chose to include because 1) I like its visual style, which rings true to the original and 2) it's conveniently packaged for my Linux distribution so it was an easy install. But you should check out your other options as well. Here's [another one][3] that looks like it may be promising, but I haven't tried it.
|
||||
|
||||
Since MyMan was packaged for Fedora, installation was as simple as:
|
||||
|
||||
```
|
||||
$ dnf install myman
|
||||
```
|
||||
|
||||
MyMan is made available under an MIT license and you can check out the source code on [SourceForge][4].
|
||||

|
||||
Do you have a favorite command-line toy that you think I ought to profile? The calendar for this series is mostly filled out but I've got a few spots left. Let me know in the comments below, and I'll check it out. If there's space, I'll try to include it. If not, but I get some good submissions, I'll do a round-up of honorable mentions at the end.
|
||||
|
||||
Check out yesterday's toy, [The Linux terminal is no one-trick pony][5], and check back tomorrow for another!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/18/12/linux-toy-myman
|
||||
|
||||
作者:[Jason Baker][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/jason-baker
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://en.wikipedia.org/wiki/Pac-Man
|
||||
[2]: https://wiki.archlinux.org/index.php/pacman
|
||||
[3]: https://github.com/YoctoForBeaglebone/pacman4console
|
||||
[4]: https://myman.sourceforge.io/
|
||||
[5]: https://opensource.com/article/18/12/linux-toy-ponysay
|
||||
@@ -1,52 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Head to the arcade in your Linux terminal with this Pac-man clone)
|
||||
[#]: via: (https://opensource.com/article/18/12/linux-toy-myman)
|
||||
[#]: author: (Jason Baker https://opensource.com/users/jason-baker)
|
||||
|
||||
用这个吃豆人克隆在你的终端中玩街机
|
||||
======
|
||||
想要重现你最喜欢的街机游戏的魔力么?今天的命令行玩具将带你回到过去。
|
||||

|
||||
|
||||
欢迎来到今天的 Linux 命令行玩具日历。如果这是你第一次访问该系列,你可能会问自己什么是命令行玩具。基本上,它们是游戏和简单的消遣,可以帮助你在终端玩得开心。
|
||||
|
||||
有些是新的,有些是古老的经典。我们希望你喜欢。
|
||||
|
||||
今天的玩具,MyMan,是经典街机游戏[吃豆人][1](你不会认为这是[类似命名的][2] Linux 包管理器对吧?)的有趣克隆。 如果你和我一样,为了在吃豆人游戏中取得高分,你过去在其中花费了很多时间,那么有机会的话,你应该试试这个。
|
||||
|
||||
MyMan 并不是 Linux 终端上唯一的吃豆人克隆版,但是我选择介绍它,因为 1)我喜欢它与原版一致的视觉风格,2)它为我的 Linux 发行版已打包,因此安装很容易。但是你也应该看看其他的克隆。这是[另一个][3]看起来可能不错的,但我没有尝试过。
|
||||
|
||||
由于 MyMan 已为 Fedora 打包,因此安装非常简单:
|
||||
|
||||
```
|
||||
$ dnf install myman
|
||||
```
|
||||
|
||||
MyMan 在 MIT 许可下可用,你可以在 [SourceForge][4] 上查看源代码。
|
||||

|
||||
你有特别喜欢的命令行小玩具需要我介绍的吗?这个系列要介绍的小玩具大部分已经有了落实,但还预留了几个空位置。如果你有特别想了解的可以评论留言,我会查看的。如果还有空位置,我会考虑介绍它的。如果没有,但如果我得到了一些很好的意见,我会在最后做一些有价值的提及。
|
||||
|
||||
了解一下昨天的玩具,[Linux 终端能做其他事][5],还有记得明天再来!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/18/12/linux-toy-myman
|
||||
|
||||
作者:[Jason Baker][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/jason-baker
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://en.wikipedia.org/wiki/Pac-Man
|
||||
[2]: https://wiki.archlinux.org/index.php/pacman
|
||||
[3]: https://github.com/YoctoForBeaglebone/pacman4console
|
||||
[4]: https://myman.sourceforge.io/
|
||||
[5]: https://opensource.com/article/18/12/linux-toy-ponysay
|
||||
@@ -7,60 +7,60 @@
|
||||
[#]: via: (https://itsfoss.com/bash-5-release)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
Bash 5.0 发布了新功能
|
||||
Bash 5.0 Released with New Features
|
||||
======
|
||||
|
||||
[邮件列表][1]证实最近发布了 Bash-5.0。而且,令人兴奋的是它还有新功能和新变量。
|
||||
The [mailing list][1] confirmed the release of Bash-5.0 recently. And, it is exciting to know that it comes baked with new features and variable.
|
||||
|
||||
如果你一直在使用 Bash 4.4.XX,那么你一定会喜欢 [Bash][2] 的第五个主要版本。
|
||||
Well, if you’ve been using Bash 4.4.XX, you will definitely love the fifth major release of [Bash][2].
|
||||
|
||||
第五个版本侧重于新的 shell 变量和许多重大漏洞修复。它还引入了一些新功能还有一些让 bash-4.4 和 bash-5.0 之间不兼容的更改。
|
||||
The fifth release focuses on new shell variables and a lot of major bug fixes with an overhaul. It also introduces a couple of new features along with some incompatible changes between bash-4.4 and bash-5.0.
|
||||
|
||||
![Bash logo][3]
|
||||
|
||||
### 新功能怎么样?
|
||||
### What about the new features?
|
||||
|
||||
邮件列表解释了此版本中修复的 bug:
|
||||
The mailing list explains the bug fixed in this new release:
|
||||
|
||||
> 此版本修复了 bash-4.4 中的几个主要错误,并引入了几个新功能。最重要的 bug 修复是对 nameref 变量的解析以及通过模糊测试发现的许多潜在的内存越界错误。在为了符合 Posix 标准解释而不进行单词拆分的上下文中,对 $@ 和 $* 的展开做了许多变化,另外还有解决极端情况中 Posix 一致性的修改。
|
||||
> This release fixes several outstanding bugs in bash-4.4 and introduces several new features. The most significant bug fixes are an overhaul of how nameref variables resolve and a number of potential out-of-bounds memory errors discovered via fuzzing. There are a number of changes to the expansion of $@ and $* in various contexts where word splitting is not performed to conform to a Posix standard interpretation, and additional changes to resolve corner cases for Posix conformance.
|
||||
|
||||
它还引入了一些新功能。根据发布说明,最值得注意的新功能是几个新的 shell 变量:
|
||||
It also introduces some new features. As per the release note, these are the most notable new features are several new shell variables:
|
||||
|
||||
> BASH_ARGV0、EPOCHSECONDS 和 EPOCHREALTIME。内置的 “history” 可以删除指定范围的条目,并能将负数理解为从历史末端开始的偏移量。有一个选项允许局部变量继承前一个范围内具有相同名称的变量的值。有一个新的shell选项,在启用它时,会导致 shell 只尝试一次扩展关联数组下标(这在算术表达式中使用时会出现问题)。“globasciiranges” 这个 shell 选项现在默认启用。可以在配置时默认关闭它。
|
||||
> The BASH_ARGV0, EPOCHSECONDS, and EPOCHREALTIME. The ‘history’ builtin can remove ranges of history entries and understands negative arguments as offsets from the end of the history list. There is an option to allow local variables to inherit the value of a variable with the same name at a preceding scope. There is a new shell option that, when enabled, causes the shell to attempt to expand associative array subscripts only once (this is an issue when they are used in arithmetic expressions). The ‘globasciiranges‘ shell option is now enabled by default; it can be set to off by default at configuration time.
|
||||
|
||||
### Bash-4.4 和 Bash-5.0 之间有哪些变化?
|
||||
### What about the changes between Bash-4.4 and Bash-5.0?
|
||||
|
||||
更新日志提到了不兼容的更改和支持 readline 版本历史记录。它是这么说的:
|
||||
The update log mentioned about the incompatible changes and the supported readline version history. Here’s what it said:
|
||||
|
||||
> bash-4.4 和 bash-5.0 之间存在一些不兼容的变化。尽管我已经尽量最小化兼容性问题,但是对 nameref 变量解析的更改意味着对 namerefs 的某些使用会有不同的行为。默认情况下,如果启用了扩展调试模式,shell 仅在启动时设置 BASH_ARGC 和 BASH_ARGV。它被无条件地设置是一个疏忽,并且在脚本传递大量参数时会导致性能问题。
|
||||
> There are a few incompatible changes between bash-4.4 and bash-5.0. The changes to how nameref variables are resolved means that some uses of namerefs will behave differently, though I have tried to minimize the compatibility issues. By default, the shell only sets BASH_ARGC and BASH_ARGV at startup if extended debugging mode is enabled; it was an oversight that it was set unconditionally and caused performance issues when scripts were passed large numbers of arguments.
|
||||
>
|
||||
>如果需要,可以将 Bash 链接到已安装的 Readline 库,而不是 lib/readline 中的私有版本。只有 readline-8.0 及更高版本能够提供 bash-5.0 所需的所有符号。早期版本的 Readline 库无法正常工作。
|
||||
> Bash can be linked against an already-installed Readline library rather than the private version in lib/readline if desired. Only readline-8.0 and later versions are able to provide all of the symbols that bash-5.0 requires; earlier versions of the Readline library will not work correctly.
|
||||
|
||||
我相信一些添加的功能/变量非常有用。我最喜欢的一些是:
|
||||
I believe some of the features/variables added are very useful. Some of my favorites are:
|
||||
|
||||
* 有一个新的(默认情况下禁用,文档中没有说明)shell 选项,用于在运行时启用/禁用向 syslog 发送历史记录。
|
||||
* 正如文档一直所说的那样,除非 shell 处于调试模式,否则它不会在启动时自动设置 BASH_ARGC 和 BASH_ARGV,但如果脚本在上层引用它们且没有启用调试模式,那么 shell 将动态创建它们。
|
||||
* 现在可以使用 “-d start-end” 删除指定范围的 “history” 条目。
|
||||
* 如果启用了作业控制的非交互式 shell 检测到前台作业因 SIGINT 而死亡,则其行为就像接收到 SIGINT 一样。
|
||||
* BASH_ARGV0:一个新变量,扩展为 $0 并在赋值时设置 $0。
|
||||
* There is a new (disabled by default, undocumented) shell option to enable and disable sending history to syslog at runtime.
|
||||
* The shell doesn’t automatically set BASH_ARGC and BASH_ARGV at startup unless it’s in debugging mode, as the documentation has always said, but will dynamically create them if a script references them at the top level without having enabled debugging mode.
|
||||
* The ‘history’ can now delete ranges of history entries using ‘-d start-end’.
|
||||
* If a non-interactive shell with job control enabled detects that a foreground job died due to SIGINT, it acts as if it received the SIGINT.
|
||||
* BASH_ARGV0: a new variable that expands to $0 and sets $0 on assignment.
|
||||
|
||||
|
||||
|
||||
要查看完整的更改和功能列表,请参阅[邮件列表文章][1]。
|
||||
To check the complete list of changes and features you should refer to the [Mailing list post][1].
|
||||
|
||||
### 总结
|
||||
### Wrapping Up
|
||||
|
||||
你可以使用下面的命令检查你当前的 Bash 版本:
|
||||
You can check your current Bash version, using this command:
|
||||
|
||||
```
|
||||
bash --version
|
||||
```
|
||||
|
||||
你很可能安装了 Bash 4.4。如果你想获得新版本,我建议等待你的发行版提供它。
|
||||
It’s more likely that you’ll have Bash 4.4 installed. If you want to get the new version, I would advise waiting for your distribution to provide it.
|
||||
|
||||
你怎么看待 Bash-5.0 发布?你在使用其他 bash 的替代品么?如果有的话,这个更新会改变你的想法么?
|
||||
With Bash-5.0 available, what do you think about it? Are you using any alternative to bash? If so, would this update change your mind?
|
||||
|
||||
请在下面的评论中告诉我们你的想法。
|
||||
Let us know your thoughts in the comments below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@@ -68,7 +68,7 @@ via: https://itsfoss.com/bash-5-release
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
Reference in New Issue
Block a user