3 ms·
Seems like as good a time as any to show off this cursed thing I keep in my dotfiles: # Allow .. through ........... (yup!) to cd up some number of directo
by smitelli 2y ago
Seems like as good a time as any to show off this cursed thing I keep in my dotfiles:
# Allow .. through ........... (yup!) to cd up some number of directories.
for i in {1..10}; do
spaces=$(printf "%${i}s")
alias "${spaces// /.}."="cd ${spaces// /../}"
done
Going into it, I thought it would be something I'd use all the time. In practice all I ever use is `..` and not nearly as much as I originally imagined I would.
- lordgrenville 2y agoI have something similar (though less elegant). I find the best use case to be hitting ..........<RET> to get to root (in conjunction with zsh auto_cd option), rather than typing `cd /`.
- akprasad 2y agoI use something similar: .. , .2 , .3 , etc.
- deleted 2y ago[deleted]