zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Jean-Baptiste Quenot <jb.quenot@caraldi.com>
Cc: zsh-workers@sunsite.dk
Subject: Re: [PATCH] killall completion for FreeBSD
Date: Fri, 23 Jul 2004 16:08:34 +0200	[thread overview]
Message-ID: <25025.1090591714@trentino.logica.co.uk> (raw)
In-Reply-To: <20040721211529.GA2406@watt.intra.caraldi.com>

Jean-Baptiste Quenot wrote:
> 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.

Thanks.

That doesn't seem to work on the sourceforge FreeBSD 4.8 machine. As
you say, it comes down to the syntax for ps output options. `ps ho cmd'
seems to be Linux only. `ps ho comm' is more suitable because it
doesn't print arguments but it doesn't seem to work everywhere. `ps ho
command' seems to work on all the BSDs I tried. So I'll try this patch
instead.

Oliver

Index: Completion/Unix/Command/_killall
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_killall,v
retrieving revision 1.2
diff -u -r1.2 _killall
--- Completion/Unix/Command/_killall	19 Aug 2002 15:00:10 -0000	1.2
+++ Completion/Unix/Command/_killall	23 Jul 2004 13:51:37 -0000
@@ -1,9 +1,9 @@
 #compdef killall killall5
 
-if [[ $service = killall && "$OSTYPE" = linux* ]]; then
+if [[ $service = killall && "$OSTYPE" = (linux*|*bsd*|darwin*) ]]; then
   _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} }'
+    'signals:: _signals -p' \
+    'processes-names:process:{ compadd "$expl[@]" ${${${${(f)"$(_call_program processes-names ps ${${EUID/(#s)0(#e)/xa}//[0-9]#/}ho command 2> /dev/null)"//[][\(\)]/}:#(ps|COMMAND|-*)}%%\ *}:t} }'
 else
   _signals -p
 fi


  reply	other threads:[~2004-07-23 14:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-21 21:15 Jean-Baptiste Quenot
2004-07-23 14:08 ` Oliver Kiddle [this message]
2004-07-23 15:07   ` Jean-Baptiste Quenot
2004-07-23 16:16     ` Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25025.1090591714@trentino.logica.co.uk \
    --to=okiddle@yahoo.co.uk \
    --cc=jb.quenot@caraldi.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).