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

Re: [PATCH] rewrite _killall



> 2018/06/28 23:52、dana <dana@xxxxxxx>のメール:
> On 28 Jun 2018, at 02:39, Jun T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
>> +  _arguments -s -S : $args
> 
> `-A '-*'` would be appropriate for this one.

I didn't add this because "killall -SIGNAL -<TAB>" does not complete
options if -A '-*' is included.
If we do not want to complete options after process names, something
like the following (patch to my previous patch) may be necessary.
A problem of this is now users can't customize by tag-order.


diff --git a/Completion/Unix/Command/_killall b/Completion/Unix/Command/_killall
index a62181c25..d603e6e4a 100644
--- a/Completion/Unix/Command/_killall
+++ b/Completion/Unix/Command/_killall
@@ -69,9 +69,9 @@ else # bsd and darwin
     '-t[limit to processes running on specified tty]: :_ttys -od'
     "-c[with -u or -t, limit to processes matching specified name]: :_process_names $opts"
     '-z[do not skip zombies]'
-    "1: : _alternative 'signals::_signals -p' 'processes-names::_process_names $opts'"
     "*: :_process_names $opts"
+    + '(signal)' -$signals[2,-3]
   )
-  _arguments -s -S : $args
+  _arguments -s -S -A '-*' : $args
 
 fi



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