Skip to content

Instantly share code, notes, and snippets.

@pbatey
pbatey / .zshrc-mark-jump
Last active June 5, 2024 17:52
mark and jump commands for faster navigation
# Add `. ~/.zshrc-mark-jump` to ~/.zshrc for faster navigation with mark and jump
export MARKPATH=$HOME/.marks
function jump {
cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1"
}
function mark {
mark=$1
if [ -z "$mark" ]; then marks; return; fi
if [ "$mark" = "." ]; then mark=$(basename "$PWD"); fi