Skip to content

Instantly share code, notes, and snippets.

@dm4
Created May 3, 2024 17:06
Show Gist options
  • Save dm4/bcc2b4ad28d73c770b405a11ea0006fe to your computer and use it in GitHub Desktop.
Save dm4/bcc2b4ad28d73c770b405a11ea0006fe to your computer and use it in GitHub Desktop.
用 fzf 選擇 autojump 的目標 https://blog.dm4.tw/fzf-select-autojump-target
export FZF_COMPLETION_TRIGGER=',,'
_fzf_complete_j() {
_fzf_complete --prompt="autojump> " -- "$@" < <(
j -s | awk -F $'\t' '/^___/{exit} {print $2}' | tac
)
}
_fzf_complete_j_post() {
awk '{printf "\"%s\"", $0}'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment