2
如何列出在shell中定義的所有別名。 像下面的命令列出的所有文件/目錄中的文件夾 我在的〜/ .bashrc定義了一些別名,我想列出所有在linux shell中獲取所有別名
命令
ls in a directory
如何列出在shell中定義的所有別名。 像下面的命令列出的所有文件/目錄中的文件夾 我在的〜/ .bashrc定義了一些別名,我想列出所有在linux shell中獲取所有別名
ls in a directory
你想知道如果你有一個UNIX別名已設置特定的命令?
可以通過發出此命令行上很容易找到它:
alias
此命令將列出當前設置爲你shell帳號的所有別名。
只需鍵入alias
在終端? 這應該會給你所有活躍的別名。
例如:
$alias
alias ..='cd ..'
alias ...='cd ../..'
alias ga='git add'
alias gc='git commit'
alias gitlg='git log --graph --pretty=format:'\''%Cred%h%Creset -
%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --abbrev-
commit'
alias gs='git st'
alias ll='ls -l'
alias ls='ls -F --color=auto --show-control-chars'
[列出魚/ bash shell中所有可用的別名]的可能副本(https://stackoverflow.com/questions/39942004/list-all-aliases-available-in-fish-bash-shell) –