This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: control-R broken in bash (__fzf_history__)


On Mon, Nov 30, 2015 at 12:36:16PM -0600, David Blackstone wrote:
> Recently I found that the behavior of control-R in bash had changed.
> The key binding has been modified by the fzf-bash package to activate
> the fzf fuzzy search program.  The first noticeable result is that
> pressing control-R displays a message with the string
> $(__fzf_history__) followed by a listing of history commands, instead
> of searching through command-line history the way control-R worked
> before.
> 
> I update my cygwin install frequently installing all new packages.  So
> far the only way I've found to deactivate this is to uninstall the
> fzf-bash package, but that is going to make my updates more
> complicated as I'll have to click to install all packages then
> manually deselect that package before proceeding.
> 
> Is there a way to disable the fzf bash keybinding without having to
> uninstall the package?  Is there any chance this package could be
> modified to not be turned on without being explicitly enabled in the
> user's shell configuration files, so this radical environment change
> doesn't happen just from installing the package?

fzf-bash installs a script into /etc/profile.d so that, once installed,
the key bindings are available.  I think it's reasonable to assume that
someone installing the package would want the functionality -- your
desire to install all the packages but not have all the function
notwithstanding -- and as such I'm not willing to clobber the package so
that people installing it need to do extra work to be able to use it.

If you want to keep installing everything but want to maintain existing
Ctrl-R behaviour, your best bet is to explicitly bind Ctrl-R to the Bash
reverse-search function.  You can do this by adding the following line
to your .bashrc, which (unless you're doing something odd) is executed
after the contents of /etc/profile.d:

    bind '\C-r:reverse-search-history'

Adam

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]