[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How does one disable completion when nothing but tabs or spaces is o
Re: How does one disable completion when nothing but tabs or spaces is on the line?
Tue, 01 Jan 2013 15:31:29 -0800
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:22.214.171.124) Gecko/20100228 Lightning/0.9 Thunderbird/126.96.36.199 Mnenhy/0.7.6.666
Chet Ramey wrote:
I did not say I wanted to disable TAB completion.
I want a conditional disabling similar to that which disables
empty-command-completion, but I want it:
On 12/31/12 4:48 PM, Linda A. Walsh wrote:
If I have nothing but tabs or spaces on a line, how do I disable completion
but have it return the char typed? (space or tab) -- and if bash is looking
for a command, then execute any command.
If you don't want TAB to perform completion, you have two choices:
1) ANY time the cursor is in column 0
2) Any time there is only white space on the line before the cursor.
That's not something that any of the suggestions I've seen allow for.
If you want to insert a TAB without having it perform completion while
leaving it bound to `complete', you can:
1. Bind some key sequence to `tab-insert' and use that (readline binds
M-TAB to that, but bash overrides it)
2. Use the key sequence bound to `quoted-insert' (^V by default) before
Neither would work with normal text processing -- either cut/paste
or a program reading a script and driving a bash session via a pty or
NOTE: I tried binding a key like 'backquote' ("`") to the completion
but it seems rebinding in readline doesn't work consistently. Is that a bug?
Who can tell? You don't provide any information that would allow anyone
to reproduce it.
Create an inputrc file with:
I also have tried:
I also noticed bash doesn't recognize META-key sequences in vi-mode.
Yet it does recognize ESC-prefixed cursor-key sequences as not being "ESC",
but I should likely address that in a separate email so as not to
confuse the issue.