zsh-users
 help / color / mirror / code / Atom feed
* kill _pids completion - arguments for ps
@ 2003-08-25 12:40 Sagar Shah
  2003-08-25 13:21 ` Oliver Kiddle
  0 siblings, 1 reply; 2+ messages in thread
From: Sagar Shah @ 2003-08-25 12:40 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 796 bytes --]

Hi,

One of the alternatives for completing the kill command is a list of
pids generated by the _pids function.

_pids calls the command 'ps' which just returns the child processes of
the shell.

I'd actually prefer to return all processes owened by the current user 
(ps -u $LOGNAME on linux) and i get the impression there's a way to
configure the completion system to use a custom command for the ps call
or a custom set of arguments. However i can't figure out how to do this.

This question was asked in the list a few years ago, but no solution
using the new syntax.

Am i right in thinking this is posible?  Or do i need to copy the entire
_pids function and hack it?

Any help would be much appreciated.

Regards

Sagar

-- 
Sagar Shah <sagarshah@softhome.net>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: kill _pids completion - arguments for ps
  2003-08-25 12:40 kill _pids completion - arguments for ps Sagar Shah
@ 2003-08-25 13:21 ` Oliver Kiddle
  0 siblings, 0 replies; 2+ messages in thread
From: Oliver Kiddle @ 2003-08-25 13:21 UTC (permalink / raw)
  To: Sagar Shah; +Cc: zsh-users

Sagar Shah wrote:
> 
> One of the alternatives for completing the kill command is a list of
> pids generated by the _pids function.
> 
> _pids calls the command 'ps' which just returns the child processes of
> the shell.
> 
> I'd actually prefer to return all processes owened by the current user
> (ps -u $LOGNAME on linux) and i get the impression there's a way to

Wherever the completion system runs a command like ps to generate
matches, it checks the `command' style so that you can specify a
replacement command. So pick your command and set the style:

e.g.:

zstyle ':completion:*:processes' command 'ps -o pid,s,nice,stime,args'

If you only want to affect the kill command then:

zstyle ':completion:*:kill:*:processes' command 'ps -o pid,s,nice,stime,args'

Oliver


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-25 13:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-25 12:40 kill _pids completion - arguments for ps Sagar Shah
2003-08-25 13:21 ` Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).