From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18505 invoked by alias); 10 Nov 2009 12:25:47 -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: X-Seq: 27381 Received: (qmail 26109 invoked from network); 10 Nov 2009 12:25:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.2.5 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.218.210 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=/cg+hFHYJp6k99tRT44MHPIEHwpEIKWRgInRArE7Gys=; b=CBO9qClmhNbFOLus6/WNyXa+z9vDJiUXMcMO7MsoLStH+x6FRjgjQ/CzJIgkwzwXbT DYFm7jLt0tgFQyOLk2B6EfRwNhU6IvqrX9mQ3Fc2sMxMwopGIusgHKfvuZvecyi5QSaM QrKmWc91Yp/nB9mcQNnGRcp03bf2LsS3qw/fk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=s2aB3VCb5+QtZT3/IILOsUsz4GzU00/2fx0qnwQ1WpBYA1XaVzVh+rx/iSZTQELwHp /oP29uHaezx2Yns2W5C400QYymfeyJS/x65VJYxHIUyep1pKGFnkWIjiIRmSf3eFfim5 b0GntvXOkhPr9a1qEATQDzb3KA22iIsluGaX0= Date: Tue, 10 Nov 2009 13:25:25 +0100 From: Baptiste Daroussin To: zsh-workers@zsh.org Subject: New completion for FreeBSD's fstat and procstat Message-ID: <20091110122525.GD54310@wicklow.lan> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="4zI0WCX1RcnW9Hbu" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) --4zI0WCX1RcnW9Hbu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Please forget my previous mail has there is a bug in _procstat so here are New Completion for FreeBSD's procstat and fstat regards, Bapt --4zI0WCX1RcnW9Hbu Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=_procstat #compdef procstat local pids #get list of pids and associated process name as comment pids=(${${${(f)"$(/usr/bin/procstat -ah)"}/[[:space:]]#/}/[[:space:]]*[[:space:]](ELF[[:digit:]]#[[:space:]]|-[[:space:]]#)/:}) _arguments -s \ '-b[Display binary information for the process]' \ '-c[Display command line arguments for the process]' \ '-f[Display file descriptor information for the process]' \ '-k[Display the stacks of kernel threads in the process]' \ '-s[Display security credential information for the process]' \ '-t[Display thread information for the process]' \ '-v[Display virtual memory mappings for the process]' \ '-h[Suppress table headers.]' \ '-a[All processes]' \ ':Process id:(($pids))' --4zI0WCX1RcnW9Hbu Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=_fstat #compdef fstat local pids pids=(${${${(f)"$(/usr/bin/procstat -ah)"}/[[:space:]]#/}/[[:space:]]*[[:space:]](ELF[[:digit:]]#[[:space:]]|-[[:space:]]#)/:}) _arguments -s \ '-f[Restrict examination to files open in the same file systems as the named file arguments]' \ '-M[Extract values associated with the name list from the specified core]:core:_files' \ '-N[Extract the name list from the specified system]:system:' \ '-m[Include memory-mapped files in the listing]' \ '-n[Numerical format]' \ '-p[Report all files open by the specified process]:Process id:(($pids))' \ '-u[Report all files open by the specified user]:User:_users' \ '-v[Verbose mode]' \ '*:Files:_files' --4zI0WCX1RcnW9Hbu--