bug-bash
[Top][All Lists]
Advanced

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

Re: set +o posix disables allowing tab as input


From: Linda Walsh
Subject: Re: set +o posix disables allowing tab as input
Date: Mon, 16 Jun 2014 18:32:09 -0700
User-agent: Thunderbird



Chet Ramey wrote:
On 6/13/14, 4:18 AM, Linda Walsh wrote:
I have my tab key set to generate a tab key instead of doing auto complete
and use ` for auto complete -- not ideal, but it works.

I found a bug in this today.

GNU bash, version 4.2.45(1)-release (x86_64-suse-linux-gnu)

if I type in "set +o posix"

to make sure posix mode is 'off',
then 'tab' is no longer allowed as input.

You're a vi-mode user.  Posix specifies that tab is bound to self-insert
when editing in vi mode, but that's not the bash default.
---
Ok...but I wasn't in posix mode (I issued a +o posix to ensure that I wasn't)

 So, bash changes
the default binding for tab to self-insert when enabling posix mode
(set -o posix), and inverts that, reverting to the default, when leaving
posix mode (set +o posix).
---
        But if it wasn't in posix mode and you execute set +o posix
should it still do the reset actions?

        I.e. shouldn't that be a no-op?

and 2)  If it gets a command to come out of posix mode, shouldn't it
restore the mode to the last "non-posix mode setting" it was in?

I.e. to restore state?

It doesn't sound like it is properly saving and restoring state...

I.e. it shouldn't "restore" state if it wasn't in posix mode before that 
command,
and when it does restore, it should use whatever state it was in before
it went into posix mode -- of course if it wasn't in posix mode to begin with
there'd the restore would be a "no-op" I'd think.

No?

I see what's happening, but you do you think that's the best course
of action?




reply via email to

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