List all aliases available in fish/bash shell

前端 未结 5 1654
情话喂你
情话喂你 2021-02-13 00:15

Is there a way to list all aliases, something like:

$ ls-aliases
.. \"cd ..\"
la \"ls -Gla\"
gs \"git stash\"
etc...

Also is it possible to add

5条回答
  •  时光取名叫无心
    2021-02-13 00:46

    In bash:

    To list all aliases:

    alias
    

    To add a comment, just put it at the end of the command, e.g.:

    $ alias foo='echo bar #some description'
    
    $ foo
    bar
    
    $ alias foo
    alias foo='echo bar #some description'
    

提交回复
热议问题