使用 && 的鱼壳别名
fishshell aliases using &&
使用 fishshell 创建别名时,我 运行 在尝试使用 && 执行命令时遇到了问题。
例如。 alias gac 'git add . && git commit -m'
&&
在 fishshell 中显然是不允许的,你应该使用 &
或 and
.
其他不起作用的东西:
alias gac 'git add . & git commit -m'
alias gac 'git add . and git commit -m'
如有任何帮助,我们将不胜感激。
and
is a command,所以需要和前面的命令分开
alias gac 'git add .; and git commit -m'
或
function gac -a commit_msg
git add .
and git commit -m $commit_msg
end
使用 fishshell 创建别名时,我 运行 在尝试使用 && 执行命令时遇到了问题。
例如。 alias gac 'git add . && git commit -m'
&&
在 fishshell 中显然是不允许的,你应该使用 &
或 and
.
其他不起作用的东西:
alias gac 'git add . & git commit -m'
alias gac 'git add . and git commit -m'
如有任何帮助,我们将不胜感激。
and
is a command,所以需要和前面的命令分开
alias gac 'git add .; and git commit -m'
或
function gac -a commit_msg
git add .
and git commit -m $commit_msg
end