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

Re: retrieving the results of last command?



On May 22, 11:45pm, Felix Rosencrantz wrote:
}
} Is there a way to configure completion, so that it will first attempt
} to only complete items that it would normally complete but are only in
} the keep list of the keeper function, and if there is nothing there
} complete as it normally would.

You'd need a trick like the one done in _expand_word_and_keep, where
you redefine compadd and then call completion.  The redefined compadd
would compare its arguments to $kept and call the real compadd only
for those that are present.

However, that'd be very difficult to do accurately, because of the
wide variety of ways that potential matches can be passed to compadd.
Your wrapper for compadd would have to take into account prefixes and
suffixes, arrays passed by name rather than value, etc.



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