如何回忆上一个 bash 命令的参数? [英] How can I recall the argument of the previous bash command?
本文介绍了如何回忆上一个 bash 命令的参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 Bash 中有没有办法调用上一个命令的参数?
Is there a way in Bash to recall the argument of the previous command?
我通常使用 vi file.c
后跟 gcc file.c
.
I usually do vi file.c
followed by gcc file.c
.
在 Bash 中有没有办法调用上一个命令的参数?
Is there a way in Bash to recall the argument of the previous command?
推荐答案
您可以使用 $_
或 !$
来调用上一条命令的最后一个参数.
You can use $_
or !$
to recall the last argument of the previous command.
此外,Alt + .
可用于调用任何先前命令的最后一个参数.
Also Alt + .
can be used to recall the last argument of any of the previous commands.
这篇关于如何回忆上一个 bash 命令的参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文