Too many aliases to remember all at once? Teach or remind yourself of one at a time.
On opening a new terminal window, show a random alias from your aliases and git aliases.
This is your IDE's tip of the day but in your terminal.
Follow instructions in this gist to setup.
This can be triggered manually or on opening a new tab.
Examples my main aliases:
$ random_alias
alias update='sudo apt-get update && sudo apt-get upgrade'
$ random_alias
ls = ls-files
Examples my git aliases:
$ random_alias
br = branch -av
You can store an alias like this:
alias foo='echo "Bar"'
If you run this you will see your alias values set:
$ alias
alias foo='echo "Bar"'
alias c='clear'
alias cp='cp -i'
...
Just be aware of that.
You can set aliases as well specific to the git
context.
Add this to your .gitconfig
.
[alias]
alias = ! git config --get-regexp ^alias\. | sed -e s/^alias\.// -e s/\ /\ =\ /
Now you can run this to see your git aliases.
git alias
st = status -s
ci = commit
br = branch -av
Add this to your .bashrc
or .aliases
file. This will concantenate the output of the two alias commands then then pick one line randomly.
alias random_alias='{ alias & git alias ;} | shuf -n 1'
And then set it up in your .bashrc
file to run on each new terminal tab opened.
random_alias