zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Michael Hwang <nomex45@yahoo.com>, zsh-workers@sunsite.dk
Subject: Re: Completion for pgrep and pkill
Date: Sun, 24 May 2009 00:42:02 -0700	[thread overview]
Message-ID: <090524004202.ZM20466@torch.brasslantern.com> (raw)
In-Reply-To: <153994.78930.qm@web37305.mail.mud.yahoo.com>

On May 23, 10:29pm, Michael Hwang wrote:
} 
} The completion relies on ps, which I know takes arguments differently
} on different platforms. Without any cross-platform experience, I can't
} say whether or not the completion will work properly on a non-GNU
} system. Someone might need to go through and change it to be more
} portable.

This is typically addressed by using zstyle for the "command" style to
allow the user to specify the program that will be used.  Look at the
_killall and _pids completers for examples of the use of _call_program,
and the documentation for the command style and for the processes and
process-names tags.

In this case you might have several contexts -- one for each of the ps
commands needed to produce the sid, ppid, pgid, etc. -- or you might
construct a single "ps" command that returns all the needed information
and then parse the output with zsh to extract the subset for each case.


      reply	other threads:[~2009-05-24  7:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-24  5:29 Michael Hwang
2009-05-24  7:42 ` Bart Schaefer [this message]

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=090524004202.ZM20466@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=nomex45@yahoo.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).