List all aliases available in fish/bash shell List all aliases available in fish/bash shell shell shell

List all aliases available in fish/bash shell


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'$ foobar$ alias fooalias foo='echo bar #some description'


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.


If someone stumbles upon this like I did:

Current fish version (3.0.2) has alias (without params) that lists all aliases.

(Similarly abbr lists all abbreviations.)

(@heemayl pointed out that bash has alias as well...)