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

Re: Bug#99095: Process completion for gdb

> This works for me.  In fact, I've set:
> zstyle ':completion:*:complete:*:*:processes' command 'ps ux'
> Since this is usually what I want (and the information from 'ps u' makes it
> easier to find the desired process)
> For gdb specifically, this isn't as useful as it might be.  Since filenames are
> completed as well, the process list will often scroll off the screen when run
> from a directory full of source code and object files.  Maybe the filename
> match should be restricted to '{,*.}core'?

We could do this to _gdb

<     _alternative 'files:: _files' "processes:: _pids -m ${w[1]:t}"
>     _alternative "core-files:: _files -g '*core'" 'files:: _files' "processes:: _pids -m ${w[1]:t}"

and then you could set zstyle ':completion:*:complete:gdb:*' tag-order 'processes core-files'

What do people think?

> Or perhaps to have some portable and extensible mechanism for selecting
> processes.  I would say that at least these should be supported:
> - All of a user's processes (ps x, ps -u user), for most uses
> - All of everyone's processes (ps ax, ps -e), for root
> - Some formatting options (ps u, ps -f) for more verbosity

The problem is accurately determining whether ps is SYSV- or BSD-style or
something else entirely.

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