Which characters are allowed in a bash alias

前端 未结 4 1725
北恋
北恋 2021-02-14 00:05

I recently added

alias ..=\'cd ..\'
alias ...=\'cd ../..\'
alias ....=\'cd ../../..\'

to my bash_aliases file. Playing around with this, I not

4条回答
  •  孤独总比滥情好
    2021-02-14 00:29

    https://www.gnu.org/software/bash/manual/html_node/Aliases.html I wouldn't name an alias .. in linux . is a special name for the current director and .. is for the parent directory. there could be some obscure process that could be screwed up by aliasing .. for cd

提交回复
热议问题