Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] new function to complete names of running process (and three example usage)
- X-seq: zsh-workers 43082
- From: dana <dana@xxxxxxx>
- To: Jun T <takimoto-j@xxxxxxxxxxxxxxxxx>
- Subject: Re: [PATCH] new function to complete names of running process (and three example usage)
- Date: Wed, 20 Jun 2018 21:23:17 -0500
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=nqukvOorxx7kZ8FA2X9wNzqIuC4F5770qCqvrQTMefQ=; b=tyzV7v8vE2Ox86zFD81KqAOQzebqmX64KRqSYtvg4KPOKce3yukHWCTNpN6mIaBJBk mz6Fqaovq/a9opiGgabGzEZItcX9t/MR448VenEdAP2XKZQNlz8yzvJCqAW1zVa4uLqj tqq+fYnSBLb7UfuqbG2jUKe5IZLFWM7hLhmKD/j1Q7ds7J8+nvinw7W8+s20bXPia6dY L8OTJAEWs86/ykAanKwFubhuj+2dycJ+NDbPA06aLhswpypocyTU9RCMeuT3KZ8F9rYJ a6JXh2vCrXZvt5+WmSnX7LDWkol2hW9k9F7MH12lqKJzUK2Hejna6CbgFA+Jc8FTQBMc /jvg==
- In-reply-to: <40B3D22E-DAC5-4FC9-BFA6-2E9CEDA4AAA2@kba.biglobe.ne.jp>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <40B3D22E-DAC5-4FC9-BFA6-2E9CEDA4AAA2@kba.biglobe.ne.jp>
On 20 Jun 2018, at 07:30, Jun T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
>_process_names completes names of running processes.
Solaris ps doesn't support BSD-style options (it needs -o rather than o), but if
you account for that it should work as intended there.
btw, this method of getting the process names seems fine for most tools on
macOS, but there might be trouble elsewhere. For example, it's tempting to have
pgrep/pkill use it, but on Linux they specifically *want* that truncated 'comm'
name (unless -f is used). If the function is ever used for other tools it might
need to learn some extra options to control how it gets the names.
On 20 Jun 2018, at 07:30, Jun T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
>I wrote this for using it from three new completions for macOS-specific commands
>dtruss
dtruss isn't Mac-specific. It was originally written for Solaris, and is also
available on *BSD. It should probably go under Unix i think.
dana
Messages sorted by:
Reverse Date,
Date,
Thread,
Author