On 30/08/2022 14:04, Eric Cook wrote:
I really like your elegant solution. My lingering preference for aliases is that they are so easy to tab expand and tweekOn 8/30/22 04:02, zzapper wrote:# automatically turn previous command into an aliasalias mkal='_f(){_al=$(history -n -1 -1 | sed "s#\\\\n##" ); alias $1="$_al" ; alias -L "$1"};_f'any improvements, easier way etcaliases_suck() { aliases[${1:?no name given}]=$history[$((HISTCMD-1))] alias -L $1 }
zzapper