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

Re: New style completion stuff



This may be the last message from me for about a week ... and I don't
have a lot of time, so just one comment:

On Feb 15, 11:59am, Sven Wischnowsky wrote:
} Subject: New style completion stuff
}
}     - don't use the positional parameters, instead store the words in
}       an array, say `words', and store *all* words in that array, not
}       only the arguments
}     - we could then avoid the value `argument' for the parameter
}       CONTEXT, the shell code would only have to check if CURRENT is 1 
}       or not to find out if we are completing a command name or an
}       argument

I didn't want to do this originally, in part because of ksharrays.  You
have to remember to unsetopt that, or CURRENT won't be the correct index
into the words.  If you use $argv, ksharrays doesn't matter.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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