Environment & Shell Customization (Aliases/Functions/.Bashrc)
Stop losing your place when jumping between deep directories
đź§© The Challenge
Everyone has that one project buried five levels deep in /var/www/html/app/current/config that they need to touch ten times an hour. Typing out that path manually or hitting the up-arrow a dozen times is a total productivity killer.
đź’ˇ The Fix
Use a shell function to create a “bookmark” system that lets you jump to your most frequent working directories with a single, short command. You’ll stop fat-fingering long paths and get back to actually working.
jump() {
case "$1" in
set) [ -n "$2" ] && echo "cd $PWD" > ~/.jump_$2 ;;
*) [ -f ~/.jump_$1 ] && . ~/.jump_$1 || echo "No bookmark found" ;;
esac
}
⚙️ Why It Works
This snippet dynamically sources a small shell file created by the set command, essentially tricking the shell into changing your current directory as if you typed it yourself. It’s way faster than maintaining a massive list of hardcoded aliases in your bashrc.
🚀 Pro-Tip: Add a custom tab-completion script for these so you don’t even have to remember the bookmark names.
Linux Tips & Tricks | © ngelinux.com | 9/2/2026
