Skip to content

Instantly share code, notes, and snippets.

@FeepingCreature
Created July 13, 2020 14:34
Show Gist options
  • Save FeepingCreature/5f575b6fcda041a48f58a778ef0e9df3 to your computer and use it in GitHub Desktop.
Save FeepingCreature/5f575b6fcda041a48f58a778ef0e9df3 to your computer and use it in GitHub Desktop.
# bind ctrl-E to "edit fuzzy"
function edit_fuzzy() {
TARGET=$(fzf)
if [ $? -eq 0 ]
then
echo -e "${PS1@P}edit $TARGET"
edit "$TARGET"
history -s "edit $TARGET"
READLINE_LINE=""
fi
}
bind -x '"\C-e":edit_fuzzy'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment