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: Eduardo A . Bustamante López
Subject: Re: [Help-bash] I'm confused why some of my .inputrc settings are not being applied
Date: Wed, 7 Jan 2015 15:58:09 -0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Jan 07, 2015 at 03:01:18PM -0800, Mun wrote:
[...]
> I have the following in my .inputrc file; but the entries marked with
> "***" are not present in the output of a 'bind -v' command (nor do the
> settings appear to be set in my bash session):
[...]
>  ***  set colored-stats on

I find that weird:

| address@hidden ~ % bash -ic 'bind -v|grep color'                              
               
| set colored-stats off
| 
| address@hidden ~ % INPUTRC=/dev/fd/3 bash -ic 'bind -v|grep color' 3<<<'set 
colored-stats on'
| set colored-stats on
| 
| address@hidden ~ % bash -ic 'bind -f /dev/fd/3; bind -v|grep color' 3<<<'set 
colored-stats on' 
| set colored-stats on

It's clearly setting that variable, via INPUTRC and bind -f file. Are you sure
bash is reading that file?

| address@hidden ~ % echo 'set colored-stats on'>f; INPUTRC=f strace -fo /tmp/s 
-e open,clone bash -ic 'bind -v|grep color'
| set colored-stats on
| 
| address@hidden ~ % grep -e '"f"' /tmp/s
| 26079 open("f", O_RDONLY <unfinished ...>
|
| address@hidden ~ % head -n3 /tmp/s
| 26076 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
| 26076 open("/lib/x86_64-linux-gnu/libncurses.so.5", O_RDONLY|O_CLOEXEC) = 3
| 26076 open("/lib/x86_64-linux-gnu/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 3

Try using strace -f to see if bash or one of the subshells is reading the file.
In my case, it's 'bind' reading the file before printing with -v.

Of course, I'm not saying it doesn't happen. It's just that having more
information (like an strace), is always useful.



reply via email to

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