1
在我的Ubuntu系统,我想使用bash history命令来记住一些命令,但是当我输入命令,如:逃逸划线标志
history -s "-t tag_name"
庆典报告错误:
bash: history: -t: invalid option
history: usage: history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]
看来的-s
选项的参数不能与划线标志开始的,因为当我输入类似
history -s "echo test"
它工作正常。
如何让历史记住一个命令以短划线开头? (无需增加导致空格)
我很惊讶错误消息只提到' -t'; '-t tag_name'被作为单个参数传递。 – chepner