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

Re: Add some tips in `compadd` docs about groups



On Mon 19 May 2025, at 01:38, RocketDev wrote:
> Yes, I know that, and would like to use such a wrapper function. However, soon
> I found that there was no such a function perfectly matches my requirement.

sorry, i meant one of the general-purpose helper functions for the
completion system itself, like _describe or _wanted. you're talking
about a 'type' function, and i'm sure you're right that there isn't one
that does what you need. maybe you could make `_pids -m` work but
probably not accurately

if it's something that other functions might use we could add a
_nonkernel_pids or whatever. or extend _pids with some more options for
filtering the output. but i don't know how common it is that you need to
exclude kernel threads for one specific tool. if a user wants to do it
generally (which they might because they're usually pointless) they can
set the command style on the processes tag:

  zstyle ':completion:*:*:processes' command 'ps -N -p2 --ppid=2'

dana




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