From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24336 invoked by alias); 21 Jun 2018 02:23:23 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43082 Received: (qmail 26065 invoked by uid 1010); 21 Jun 2018 02:23:23 -0000 X-Qmail-Scanner-Diagnostics: from mail-io0-f193.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.223.193):SA:0(-1.9/5.0):. Processed in 1.95906 secs); 21 Jun 2018 02:23:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIMWL_WL_MED,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=nqukvOorxx7kZ8FA2X9wNzqIuC4F5770qCqvrQTMefQ=; b=O5PZ+ZkQAjdLNlsb1IUy8ow82TRelwfyAxPFIg03osSOVuz4l59weSYos+BS4gh7IR UFwlOKaliUaK+ktMIgrIaEyQOFB+WqVNvUnVFNQH2TpiiRzAwWFTuMvxsV3fWhXBAKqN 1E3ZL4rUj3u5oxs4tkdKaREGistdJ387qoFKrC9d3Bria+PHS+vKdAJwQCNtQYuJ5Avs RKmv96qR4AV58Sl+cWWBhAG+CBDy55UCe5vo/oVzWhGcH1+gBAyc9xsU/eGzlZflfVvu MX9SXJDfNdMgjwGrv2/mAqXsQfe+6tuvzwwYpVFnHVNxeDpCLrFYlPVpAJVMlz74Sz9u W/Aw== X-Gm-Message-State: APt69E0T2cxXoVRZubtoYAJx+fihFCDZYeihvH0Eh0tZTiMpHXKAPtfG ddMWIQNSdJ0636CPUe9b6Sv3dg== X-Google-Smtp-Source: ADUXVKKIibNNZDvEsHflF3CGoJJyKaWjKhU9x2ADx9oBJPSxi0p2qRuDyXpvXPLkeaW7XJi+CTYubg== X-Received: by 2002:a6b:e20c:: with SMTP id z12-v6mr18242911ioc.280.1529547798609; Wed, 20 Jun 2018 19:23:18 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: [PATCH] new function to complete names of running process (and three example usage) From: dana In-Reply-To: <40B3D22E-DAC5-4FC9-BFA6-2E9CEDA4AAA2@kba.biglobe.ne.jp> Date: Wed, 20 Jun 2018 21:23:17 -0500 Cc: zsh-workers@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: <8583E32C-BB6B-4136-AAC3-9F95C266C930@dana.is> References: <40B3D22E-DAC5-4FC9-BFA6-2E9CEDA4AAA2@kba.biglobe.ne.jp> To: Jun T X-Mailer: Apple Mail (2.3445.6.18) On 20 Jun 2018, at 07:30, Jun T 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 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