How do you recall your most used commands?
For example, things you do often but not often enough to make a muscle memory? On Linux systems with Bash, I just use bash aliases. If I do it more than once, It gets an alias or a script; cause I won’t remember next time. Example of my current desktop aliases :
<span style="color:#323232;">alias fuck='sudo $(history -p !!)'
</span><span style="color:#323232;">alias hstat='curl -o /dev/null --silent --head --write-out '''%{http_code}n''''
</span><span style="color:#323232;">alias ls='ls -la --color=auto'
</span><span style="color:#323232;">alias pwgen='< /dev/urandom tr -dc "_A-Z-a-z-0-9#+=$" | head -c${1:-15};echo;'
</span><span style="color:#323232;">alias rsync='rsync -ah --info=progress2'
</span><span style="color:#323232;">
</span>
And in my bashrc I have the following settings and functions which come in handy when heads down in the terminal:
<span style="color:#323232;"># append to the history file, don't overwrite it
</span><span style="color:#323232;">shopt -s histappend
</span><span style="color:#323232;">
</span><span style="color:#323232;"># for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
</span><span style="color:#323232;">HISTSIZE=1000
</span><span style="color:#323232;">HISTFILESIZE=2000
</span><span style="color:#323232;">HISTTIMEFORMAT="%Y-%m-%d %T "
</span><span style="color:#323232;">
</span><span style="color:#323232;">####
</span><span style="color:#323232;">function stopwatch() {
</span><span style="color:#323232;"> local BEGIN=$(date +%s)
</span><span style="color:#323232;"> echo Starting Stopwatch...
</span><span style="color:#323232;">
</span><span style="color:#323232;"> while true; do
</span><span style="color:#323232;"> local NOW=$(date +%s)
</span><span style="color:#323232;"> local DIFF=$(($NOW - $BEGIN))
</span><span style="color:#323232;"> local MINS=$(($DIFF / 60))
</span><span style="color:#323232;"> local SECS=$(($DIFF % 60))
</span><span style="color:#323232;"> local HOURS=$(($DIFF / 3600))
</span><span style="color:#323232;"> local DAYS=$(($DIFF / 86400))
</span><span style="color:#323232;">
</span><span style="color:#323232;"> printf "r%3d Days, %02d:%02d:%02d" $DAYS $HOURS $MINS $SECS
</span><span style="color:#323232;"> sleep 0.5
</span><span style="color:#323232;"> done
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="color:#323232;">function md() {
</span><span style="color:#323232;"> pandoc "$1" | lynx -stdin;
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="color:#323232;">function weather() {
</span><span style="color:#323232;"> ( IFS=+; curl wttr.in/$(curl -s http://ipwho.is/ | jq .postal););
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span>
So what do you do to remember or recall your most used commands?