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

Re: ps http<tab> completion to get procees ID

Bart Schaefer wrote on Tue, Jul 28, 2015 at 12:19:25 -0700:
> On Jul 28, 12:34pm, zzapper wrote:
> }
> } This works on my Cygwin zsh 5.0.8
> } but not on my Centos zsh 5.0.7
> } 
> } what needs to be configured to get this marvellous feature to work?
> Install 5.0.8 on your CentOS?
> There were a lot of changes to _main_complete as well as to _ps between
> the .7 and .8 releases.  Debug trace is radically different for the two.
> It *seems* to work to just copy the 5.0.8 _ps file into fpath somewhere
> ahead of the 5.0.7 version, but I can't promise something obscure won't
> go wrong.

It seems to only complete processes from the current terminal.  For
example, if I just do 'ps <TAB>', I get:

    % ps
    > process ID
    23620 pts/11   00:00:00 zsh
    23647 pts/11   00:00:00 zsh
    23648 pts/11   00:00:00 ps
    > all matches

I guess that's due to _pids running 'ps' without further arguments.
Shouldn't the command be configurable?  I'd love to have it show all
user processes (or even all processes when sudoed).

For 'kill' we already allow customizing the listing format via the
'command' style; I suppose it would be nice to support the same here.



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