如何将以下别名(在.bashrc中)与~/Downloads/中的文件连接起来?
alias inst=`instruction ~/Downloads/`我想以这种方式运行该命令:
inst file发布于 2020-03-07 22:21:19
使用别名无法直接实现您想要实现的目标。
实际上,你所建议的方法
alias inst='instruction ~/Downloads/' # with single quotes, not backquotes!
inst file将合计为
instruction ~/Downloads file # with a space相反,您可以考虑在.bashrc中添加函数
inst() {
instruction ~/Downloads/"$1"
}然后,以如下方式运行该命令:
inst filehttps://stackoverflow.com/questions/60578445
复制相似问题