List all aliases available in fish / bash shell

Is there a way to list all the aliases, for example:

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

Is it also possible to add human readable descriptions to aliases?

I am on MacOSX

+4
source share
2 answers

In bash:

To list all aliases:

alias

To add a comment, simply put it at the end of the command, for example:

$ alias foo='echo bar #some description'

$ foo
bar

$ alias foo
alias foo='echo bar #some description'
+6
source

, alias , , . , "". functions ( ). , functions | cat.

+4

Source: https://habr.com/ru/post/1657185/


All Articles