Last active
January 25, 2016 10:48
-
-
Save teranex/01d6b9ccd18783eaf35a to your computer and use it in GitHub Desktop.
Jump function for bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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