Skip to content

Instantly share code, notes, and snippets.

@zolotyh
Created September 26, 2019 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zolotyh/281e6d071bb096b55d1a86cab288fba4 to your computer and use it in GitHub Desktop.
Save zolotyh/281e6d071bb096b55d1a86cab288fba4 to your computer and use it in GitHub Desktop.
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
j() {
if [[ "$#" -ne 0 ]]; then
cd $(autojump $@)
return
fi
cd "$(autojump -s | gsed '/_____/Q; s/^[0-9,.:]*\s*//' | fzf --height 40% --nth 1.. --reverse --inline-info +s --tac --query "${*##-* }" )"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment