Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

tab inserts literal tab instead of completing at beginning of line

Right, so I know that's on purpose usually, but it can happen while
you're completing too:

% autoload compinit
% compinit
% mkdir foo' baz bar'
% mkdir 'bing baz bar'
% zstyle ':completion:*' matcher-list 'l:|=* r:|=*'
% setopt autocd
# this one is just to avoid completing _baz, too lazy to start over
% zstyle ':completion:*:functions' prefix-needed true
| means cursor
% baz|<tab>
results in
% |<tab>\ baz\ bar
results in
% \ baz\ bar    |

Yes, this actually happened to me. If I were to find where this
special tab-insert-at-start-of-line handling is, could I disable it,
or do I need to add an option? There's always ctrl-v tab, and why do
you want to write literal tabs at the start of the line anyway; to
paste random indented scriptlets? If that's why, maybe I can make the
thing check if the line is empty instead of $cursor==0?

Mikael Magnusson

Messages sorted by: Reverse Date, Date, Thread, Author