Skip to content

Commit

Permalink
Fix keyseq specification in Bash (#426)
Browse files Browse the repository at this point in the history
The current way of setting the keyseq as « bind "'\C-r': '...'" ≫
appears to be working as expected, but this is accidental.  This is
not the format that Readline supports; the keyseq cannot be enclosed
in single quotes.  This is now working because of Readline's loose
treatment of the keyseqs, but this will easily be broken with a
slightly different key.
  • Loading branch information
akinomyoga authored Jul 12, 2024
1 parent 50b2cea commit 5a16ee7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mcfly.bash
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ function mcfly_initialize {
# which should be the commented-out search from step #1. It will then remove that line from the history file and
# render the search UI pre-filled with it.
if set -o | grep "vi " | grep -q on; then
bind "'\C-r': '\e0i#mcfly: \e\C-m mcfly search\C-m'"
bind '"\C-r": "\e0i#mcfly: \e\C-m mcfly search\C-m"'
else
bind "'\C-r': '\C-amcfly: \e# mcfly search\C-m'"
bind '"\C-r": "\C-amcfly: \e# mcfly search\C-m"'
fi
fi
fi
Expand Down

0 comments on commit 5a16ee7

Please sign in to comment.