Re:Ask HN: Share your favourite bash/zsh aliases
by a3n on Saturday July 11, 2015 @01:09PM
(#9870589)
> alias alis='cat ~/.bash_aliases'
That only lists what's in .bash_aliases, along with any comments.
Why not just run alias without arguments? It lists all active aliases, however and whenever they were defined.
$ man bash
/^SHELL BUILTIN COMMANDS
...
alias [-p] [name[=value] ...]
"Alias with no arguments or with the -p option prints the list of aliases in the form alias name=value on standard output."
ali <name of alias> <command>
to get it put this in your .bashrc
When I realize I type a command often, I just push the up arrow to get the command again, append "ali" infront of it and turn it to an alias. Works direclty.And of course the alias to show the list of all aliases: