zsh-workers
 help / color / mirror / code / Atom feed
From: dana <dana@dana.is>
To: Jun T <takimoto-j@kba.biglobe.ne.jp>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH] new function to complete names of running process  (and three example usage)
Date: Thu, 21 Jun 2018 08:46:25 -0500	[thread overview]
Message-ID: <46A425A7-8C64-4C18-9155-0B95A9F3F0CA@dana.is> (raw)
In-Reply-To: <7711BBF6-596B-47F6-8565-596878C0BB4E@kba.biglobe.ne.jp>

On 21 Jun 2018, at 06:41, Jun T <takimoto-j@kba.biglobe.ne.jp> wrote:
>Thanks. Do you know 'ps -o comm' truncates the name or not?

Sorry, didn't think to mention. Both comm and args on Solaris use psinfo_t's
pr_psargs, which is limited to 80 bytes. (comm is just args cut off at the first
white-space character.)

From what i can tell, though, DTrace's execname variable (what `dtruss -n`
matches against) seems to use pr_fname, and that's limited to 16 bytes.
Unfortunately ps's fname output is truncated further to 8 bytes for no apparent
reason, so i guess if you wanted dtruss process-name completion to be
semi-accurate on Solaris you might be better off with something like this?

  ${(@M)${(@)${(f)"$( ps -Ao comm= )"}:t}##?(#c1,16)}

dana


  reply	other threads:[~2018-06-21 13:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 12:30 Jun T
2018-06-21  2:23 ` dana
2018-06-21 11:41   ` Jun T
2018-06-21 13:46     ` dana [this message]
2018-06-22 12:11       ` Jun T

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=46A425A7-8C64-4C18-9155-0B95A9F3F0CA@dana.is \
    --to=dana@dana.is \
    --cc=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /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).