help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] I'm confused why some of my .inputrc settings are not be


From: Mun
Subject: Re: [Help-bash] I'm confused why some of my .inputrc settings are not being applied
Date: Thu, 8 Jan 2015 08:57:26 -0800
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Eduardo,

On Wed, Jan 07, 2015 at 03:58 PM PST, Eduardo A. Bustamante L?pez wrote:
EABL> On Wed, Jan 07, 2015 at 03:01:18PM -0800, Mun wrote:
EABL> [...]
EABL> > I have the following in my .inputrc file; but the entries marked with
EABL> > "***" are not present in the output of a 'bind -v' command (nor do the
EABL> > settings appear to be set in my bash session):
EABL> [...]
EABL> >  ***  set colored-stats on
EABL> 
EABL> I find that weird:
EABL> 
EABL> | address@hidden ~ % bash -ic 'bind -v|grep color'                        
                     
EABL> | set colored-stats off
EABL> | 
EABL> | address@hidden ~ % INPUTRC=/dev/fd/3 bash -ic 'bind -v|grep color' 
3<<<'set colored-stats on'
EABL> | set colored-stats on
EABL> | 
EABL> | address@hidden ~ % bash -ic 'bind -f /dev/fd/3; bind -v|grep color' 
3<<<'set colored-stats on' 
EABL> | set colored-stats on

Hmm, I get the same results as you running the above commands.  However, if
from one of my shell windows I execute:

% bind -f f | grep color

Nothing it output.  So my interactive shell is not behaving correctly for some
reason it seems.

EABL> It's clearly setting that variable, via INPUTRC and bind -f file. Are you 
sure
EABL> bash is reading that file?
EABL> 
EABL> | address@hidden ~ % echo 'set colored-stats on'>f; INPUTRC=f strace -fo 
/tmp/s -e open,clone bash -ic 'bind -v|grep color'
EABL> | set colored-stats on
EABL> | 
EABL> | address@hidden ~ % grep -e '"f"' /tmp/s
EABL> | 26079 open("f", O_RDONLY <unfinished ...>
EABL> |
EABL> | address@hidden ~ % head -n3 /tmp/s
EABL> | 26076 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
EABL> | 26076 open("/lib/x86_64-linux-gnu/libncurses.so.5", O_RDONLY|O_CLOEXEC) 
= 3
EABL> | 26076 open("/lib/x86_64-linux-gnu/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 
3
EABL> 
EABL> Try using strace -f to see if bash or one of the subshells is reading the 
file.
EABL> In my case, it's 'bind' reading the file before printing with -v.
EABL> 
EABL> Of course, I'm not saying it doesn't happen. It's just that having more
EABL> information (like an strace), is always useful.

I basically got identical results to the command set above making use of
strace.

Thanks again for the very helpful reply!

Regards,

-- 
Mun



reply via email to

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