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

Re: completion after //



Alexandre Duret-Lutz wrote:

> >>> "Tanaka" == Tanaka Akira <akr@xxxxxxxxxxx> writes:
> 
>  Tanaka> Sometimes completion after ../ frustrates me.
> 
> [...]
> 
> Along with the same lines, something I don't like is
> that the path `a///////b' is not understand as 'a/b' by _path_files 
> (when I cut and past path names that contains doubled 
> slashes, it's annoying to not be able to complete after these).
> 
> I wanted to add :
> 
> # Squeeze sequences of slashes
> PREFIX="${PREFIX//(\\/)#//}"
> SUFFIX="${SUFFIX//(\\/)#//}"
> [[ $PREFIX = */ ]] && SUFFIX=${SUFFIX#/}
> 
> at the beginning of _path_files, but then realized that
> people may want to use `//' to do partial path completion.
> 
> Should this be tunable ?

I fear it will mess up completion inside braces (only if both multiple 
slashes and braces are used at the same time), but: try it. Using a
style for it, of course ;-)

When I wrote _path_files I was tempted to disallow in-path completion
inside `//' at least when that appears at the beginning, because, if
I'm not completely mistaken, there is or once was a Unix version where 
this had special meaning.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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