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

Completion for variable assigement



I'd like to have completion for assignements to a variable. So that,
for example, 

    PROJECT=<TAB>
    
will allow me to cycle through all file names in the current directory
ending with '.mak' (without the suffix). I succeeded in doing this only
by wrapping the assignement in a function 'setp':

    function projects
    {
        reply=(*.mak) 2>/dev/null
        reply=(${reply%.mak})
    }

    function setp
    {
        PROJECT=$1
    }

    compctl -K projects setp

Is there any way to avoid the wrapper function?

Regards,
Bernd

-- 
Bernd Eggink
Regionales Rechenzentrum der Uni Hamburg
eggink@xxxxxxxxxxxxxx
http://www.rrz.uni-hamburg.de/eggink/BEggink.html



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