>bash:-6ren">
gpt4 book ai didi

bash - 多词别名 (Ubuntu)

转载 作者:行者123 更新时间:2023-12-04 19:05:56 25 4
gpt4 key购买 nike

是否可以有一个由多个单词组成的别名“键”?
我试过(没有“”):

nano ~/.bashrc
alias "git puhs"="git push"
source ~/.bashrc
>>bash: alias: `git puhs`: invalid alias name
这有可能以任何其他方式吗?

最佳答案

Is it possible to have a alias 'key' that consists of multiple words?


不,这是不可能的。别名不能包含空格。可以通过在前一个别名值上添加空格来“链接”别名。
alias git="git "
alias puhs=push
为了你的理智,不要那样做,阅读 https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases .

关于bash - 多词别名 (Ubuntu),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69555615/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com