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

Re: Filename expansion within a completion widget



    Hi all :)

>     compstate[insert]=${compstate[insert]//tab /}
> 
>     compset -P '*/'
> 
>     Well, it handles both relative and absolute directories
> correctly, but doesn't handle named directories :(( I don't
> understand why because if I type 'cd ~X<TAB>' the named dir should be
> expanded, shouldn't it?
> 
>     If it shouldn't, could anyone hint me how to do it? Should I
> bother with any other similar problems (I mean, like mangling IPREFIX
> for absolute directories and the like)?

    Of course, adding something like 'PREFIX=$~PREFIX' just before
the compset call solves the problem, but then the named dir is
'translated', which I don't want, and additional code is needed in
the compadd call to 'untranslate' it. There is surely another way of
doing this...

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.dervishd.net & http://www.pleyades.net/



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