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

Re: insert-tab (Re: Getting "parse error" from _path_files)



Bart Schaefer wrote:

> On Jun 5,  4:33pm, Sven Wischnowsky wrote:
> } Subject: Re: Getting "parse error" from _path_files
> }
> } Bart Schaefer wrote:
> } 
> } > if [[ "$compstate[insert]" = tab* && "$WIDGET" != *list* ]]; then
> } >   { zstyle -T ":completion:${curcontext}:" insert-tab &&
> } >     { [[ "$curcontext" != :* || -z "$compstate[vared]" ]] ||
> } > 	zstyle -t ":completion:vared${curcontext}:" insert-tab } } && return 0
> } > 
> } > Which reminds me to wonder why insert-tab is tested for *not* being set,
> } > at that point?
> } 
> } Err...? It is tested for being set (to true), with different defaults for
> } not-in-vared and in-vared.
> 
> zagzig[38] zstyle ':completion:*' insert-tab true
> zagzig[39] ls x<TAB>
> Completing `file'
> 
> According to the doc for insert-tab, I should have gotten a tab inserted,
> because there is a non-blank character to the left of the cursor.

No, you get the tab when there is *no* non-blank character to the left:

item(tt(insert-tab))(
If this has one of the `true' values, the completion system will
insert a TAB character (assuming it was used to start completion) instead
of performing completion when there is no non-blank character to the left
of the cursor.  If set to `false', completion will be done even there.

The default value of this style is `true' unless when completing
inside the tt(vared) builtin command, where it defaults to `false'.
)


Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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