Another trick I learned from an older HN comment is to create a .marks directory in your home directory and then add the following to your .zshrc
export MARKPATH=$HOME/.marks
function jump {
cd -P $MARKPATH/$1 2>/dev/null || echo "No such mark: $1"
}
function mark {
mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH/$1
}
function unmark {
rm -if "$MARKPATH/$1"
}
function marks {
ls -l $MARKPATH | sed 's/ / /g' | cut -d' ' -f9- | sed 's/ -/ -/g' && echo
}
function _marks {
reply=($(ls $MARKPATH))
}
compctl -K _marks jump
compctl -K _marks unmark
Now to remember a directory you type % mark <any_string>
and to jump to that directory you type % jump <any_string>
To list all your shortcuts % marks
Depending on the version of ls you might have to change the -f9 parameter to -f8 for marks functions