For his usecase of funky i use ~/.bash_aliases, that way i can easily share them between machines. Eg to quickly add a new one: alias als="nvim $HOME/.bash_aliases && source $HOME/.bash_aliases" Be careful with quoting though, got myself into a situation where every new terminal asked for the root password. Shellcheck found the reason quickly. (edit) Another benefit is that those aliases abstract over differences of…
Instead of creating aliases for .., I use this: function ..() { for i in $(seq 1 $1); do cd ..; done } which enables .. # up 1 dir .. 2 # up 2 dirs .. 42 # up 42 dirs Here are some more: https://pilabor.com/blog/2021/03/unix-shell-tricks/
If you are on
/home/user/projects/app/src/handlers/
and you want to go to `app/`, you'll do: > up src
Or give name of any other child folder/file of `app/`. So if `.git` exists in `app/`, > up .git
would work too.I made it for Fish shell: https://gist.github.com/ajitid/81a4993be410586c038f8b3fc140b...