Skip to content

Instantly share code, notes, and snippets.

@teranex
Last active January 25, 2016 10:48
Show Gist options
  • Save teranex/01d6b9ccd18783eaf35a to your computer and use it in GitHub Desktop.
Save teranex/01d6b9ccd18783eaf35a to your computer and use it in GitHub Desktop.
Jump function for bash
function j() {
path=`(cat ~/bashmarks && find /home/jeroen/Projecten/ -maxdepth 3 -type d -not -path '*/\.*') | fzf --extended --query="$1" --select-1`
if [ $? -eq 0 ]; then
cd "$path"
fi
}
# ~/bashmarks is just a list of directories
# fzf can be found here: https://github.com/junegunn/fzf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment