Last active
June 24, 2016 07:01
-
-
Save kidpixo/a97d3344275fe351de28249891128118 to your computer and use it in GitHub Desktop.
Fuzzy jumping in one of the ~/.marks bookmarks used by jump/autojump. Requires fzf installed and some links in ~/.marks . Defines an 'fj' alias.
This file contains hidden or 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 fuzzyjump | |
# fuzzy cd in one of the ~/.marks bookmarks used by jump/autojump | |
# requires fzf installed and some links in ~/.marks | |
ls -l ~/.marks | awk '{print $9 $10 $11}'| sed -e '/^$/d' -e 's/\(->\)/|\1/' | column -s"|" -t | fzf | awk -F">" '{print $2}' | read -l fzf_local_result | |
if test -d $fzf_local_result | |
cd $fzf_local_result | |
else | |
echo "Directory does not exist $fzf_local_result" | |
end | |
end | |
alias fj 'fuzzyjump' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment