public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* control-R broken in bash (__fzf_history__)
@ 2015-11-30 22:59 David Blackstone
  2015-12-01 10:46 ` Adam Dinwoodie
  0 siblings, 1 reply; 3+ messages in thread
From: David Blackstone @ 2015-11-30 22:59 UTC (permalink / raw)
  To: cygwin

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?

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: control-R broken in bash (__fzf_history__)
  2015-11-30 22:59 control-R broken in bash (__fzf_history__) David Blackstone
@ 2015-12-01 10:46 ` Adam Dinwoodie
  2015-12-02 16:27   ` Keith Christian
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Dinwoodie @ 2015-12-01 10:46 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: control-R broken in bash (__fzf_history__)
  2015-12-01 10:46 ` Adam Dinwoodie
@ 2015-12-02 16:27   ` Keith Christian
  0 siblings, 0 replies; 3+ messages in thread
From: Keith Christian @ 2015-12-02 16:27 UTC (permalink / raw)
  To: cygwin

> 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

Thank you, Adam.

I asked an earlier question about fzf (different thread,) so I
followed this with interest. The bind entry for ~/.bashrc works fine.

Keith

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-02 16:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-30 22:59 control-R broken in bash (__fzf_history__) David Blackstone
2015-12-01 10:46 ` Adam Dinwoodie
2015-12-02 16:27   ` Keith Christian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).