[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Howto set a Readline variable (not in the init file!)?

From: Dave B
Subject: Re: Howto set a Readline variable (not in the init file!)?
Date: Mon, 12 Jan 2009 23:19:19 +0100
User-agent: Thunderbird (X11/20081124)

Andi Bachmann wrote:

> Hello
> I'm looking for a way to set a Readline variable, but without editing
> the init (~/.inputrc or /etc/inputrc) file.
> E.g., I'd like to have
>    set show-all-if-ambiguous on
> The thing is that I have to login to some remote server with a login 
> that I share with other users and I don't want to impose my settings by
> saving my options in a file.
> I tried
>   bind set show-all-if-ambiguous on
> but this leads to a corrupted readline behaviour: I can't type anymore 's'.
> Reading the manual 
> (http://www.gnu.org/software/bash/manual/bashref.html#Bash-Builtins) it 
> says explicitly (for the Builtin command 'bind'):
>    "Display current Readline (see Command Line Editing) key and
>     function bindings, bind a key sequence to a Readline function or
>     macro, or set a Readline variable."

According to the man, you should pass the readline binding or variable as a
single argument to bind (or at least that's what the example shown seems to
imply), so:

bind 'set show-all-if-ambiguous on'

The above line seems to do the trick for me.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]