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

[PATCH] killall completion for FreeBSD



Dear workers,

I noticed that killall completion does  not work on FreeBSD.  This patch
addresses the issue, as the  completion was originally only intended for
GNU/Linux.   Indeed,  FreeBSD  uses  a  slightly  different  syntax  for
expressing ps output options.

Best regards,
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/
--- Completion/Unix/_killall.orig	Wed Jul 21 22:31:12 2004
+++ Completion/Unix/_killall	Wed Jul 21 23:13:13 2004
@@ -4,6 +4,10 @@
   _alternative \
       'signals:: _signals -p' \
       'processes:process:{ compadd "$expl[@]" ${${${${(f)"$(_call_program processes-names ps ${${EUID/(#s)0(#e)/xa}//[0-9]#/} ho cmd 2> /dev/null)"//[][\(\)]/}:#(ps|COMMAND|-*)}%%\ *}:t} }'
+elif [[ $service = killall && "$OSTYPE" = freebsd* ]]; then
+  _alternative \
+      'signals:: _signals -p' \
+      'processes:process:{ compadd "$expl[@]" ${${${${(f)"$(_call_program processes-names ps ${${EUID/(#s)0(#e)/xa}//[0-9]#/}ho comm 2> /dev/null)"//[][\(\)]/}:#(ps|COMMAND|-*)}%%\ *}:t} }'
 else
   _signals -p
 fi


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