Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
user-sensitive kill completion in conjunction with sudo
- X-seq: zsh-users 13310
- From: "Matt Wozniski" <godlygeek@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: user-sensitive kill completion in conjunction with sudo
- Date: Tue, 7 Oct 2008 23:10:58 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=+OEpcyJjtRy8bVMEcZE/WVf30Vpc7pejDm7p7ZiHVSU=; b=txfvj6GrGB+1OHzc622f6VRj0SngKIjB7wwVfPnuda+YIh70tx/buUMANUEf9uKfSq 9AVmtvQgaQrJcta9b39kNcJJEtB6kagbVPMZtlddvAkoJAZfDyGiIFpan4iydpRSCL66 lejBdBRBz+xQODKL9OybQj/dlhQiLb9++9f0c=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=osbZQsheIWS199RwGz5kxft37Gzxzyeee/UStpeMMt0V0qiNyeOmMwALlinmRAZ9sq KZcR33pCcP3crQYzr7PTc1dm3E8XoJ9Pr8rG2I2cuvYCZ76t7EHz9rtYOIPCRSg3a0j3 kwuJ0hDmoH8ifBlpEC1s5koTB3HlquKbDbMGQ=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
I must admit that the zsh completion system is something I've never
taken time to understand as well as I should. I'm wondering if I can
get kill to complete only processes that I can send a signal to in the
current context, so
% kill ^D
shows all processes launched by me, and
% sudo kill ^D
shows all process. It would be even better if
% sudo -u someone kill ^D
showed processes launched by 'someone'. Currently, I use
zstyle ':completion:*:*:kill:*' command 'ps -u$USER -o pid,%cpu,tty,cputime,cmd'
Is there some easy (or even difficult) way to modify this to handle
the user 'kill' will be executed as?
~Matt
Messages sorted by:
Reverse Date,
Date,
Thread,
Author