3 ms·
I appreciate the DRY-ness of it, but that requires you to type 'up ...' which is longer :( A while ago when I was bored I was thinking of golfing those aliases
by kbd 9y ago
I appreciate the DRY-ness of it, but that requires you to type 'up ...' which is longer :(
A while ago when I was bored I was thinking of golfing those aliases to say (pseudocode):
for i in 2..6:
alias '.'*i=cd '../'*i
but I didn't know all the shell needed and just wound up leaving it as is.
Edit: turns out Zsh has a 'repeat' built-in:
alias $(repeat 7 echo -n '.')="cd $(repeat 7 echo -n '../')"
Still, non-portable, less clear, not worth changing the aliases.