Skip to content

Instantly share code, notes, and snippets.

@iorionda
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save iorionda/fb88f3ee68b5ef09928b to your computer and use it in GitHub Desktop.

Select an option

Save iorionda/fb88f3ee68b5ef09928b to your computer and use it in GitHub Desktop.
convenience
peco-bundle-gem-open() {
bundle help > /dev/null 2>&1
if [[ "${?}" == "0" ]]; then
local selected_dir=$(bundle show --paths | peco)
if [ -n "$selected_dir" ]; then
BUFFER="$EDITOR ${selected_dir}"
zle accept-line
fi
fi
zle clear-screen
}
zle -N peco-bundle-gem-open
bindkey '^bo' peco-bundle-gem-open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment