Site icon New Generation Enterprise Linux

Stop burning time switching directories in deep project trees

Environment & Shell Customization (Aliases/Functions/.Bashrc)

Stop burning time switching directories in deep project trees

đź§© The Challenge

Dealing with those project structures that are five levels deep drives me up the wall. Half my morning seems to disappear just typing cd ../../../projects/client/web/config over and over.

đź’ˇ The Fix

Create a shell function that bookmarks your current location and jumps you back instantly. You’ll save your sanity and avoid those annoying typos.

mark() { pwd > ~/.last_dir; }
jump() { cd "$(cat ~/.last_dir)"; }

⚙️ Why It Works

This little trick uses a hidden file in your home directory to store the path string. It’s simple, effective, and doesn’t rely on installing some bloated zsh plugin you don’t actually need.

🚀 Pro-Tip: Add a second mark-like function if you find yourself toggling between a code repo and a log directory constantly.

Linux Tips & Tricks | © ngelinux.com | 11/26/2026

0 0 votes
Article Rating
Exit mobile version