List all aliases available in fish/bash shell

前端 未结 5 1640
情话喂你
情话喂你 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:49

    Note that in fish the alias command creates a function using the alias name that wraps the alias value. So there isn't currently any way to list just "aliases". You can use the functions command to list the names of all the defined functions (which by definition includes aliases). If you want the names one per line just functions | cat.

提交回复
热议问题