在 Ubuntu 上我从 Bash 切换到了 Zsh,感觉很不错。但是有一件事情我非常想要实现却找不到方法。
在 Bash 中,当我输入一个长命令时发现需要先运行其他命令,我只需要像下面这样将它注释掉:
me@home> #mysuperlongcommand with some arguments
me@home> thecommandIhavetorunfirst #and then: up up
me@home> #mysuperlongcommand with some arguments #I just need to uncomment it!
然而,与zsh
不同的是,这种经常出现的情况并不容易解决,因为#mysuperlongcommand
将被直接运行(导致:zsh: command not found: #mysuperlongcommand
)。
;
字符,它将执行后续的命令(我刚刚运行了一个我还没有计划运行的rm -r操作:P)。 - Moshe Jonathan Gordon Radian