From owner-freebsd-pkg@FreeBSD.ORG Tue Apr 7 00:12:18 2015 Return-Path: Delivered-To: pkg@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8612B412 for ; Tue, 7 Apr 2015 00:12:18 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 17C44C74 for ; Tue, 7 Apr 2015 00:12:17 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id t370C9eN075785 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 6 Apr 2015 18:12:09 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id t370C9gh075782; Mon, 6 Apr 2015 18:12:09 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 6 Apr 2015 18:12:09 -0600 (MDT) From: Warren Block To: "Sergey V. Dyatko" Subject: Re: Share your pkg aliases In-Reply-To: <20150406093428.7027c046@laptop.minsk.domain> Message-ID: References: <20150402201909.GD30115@ivaldir.etoilebsd.net> <20150406093428.7027c046@laptop.minsk.domain> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Mon, 06 Apr 2015 18:12:09 -0600 (MDT) Cc: pkg , Kevin Oberman X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 00:12:18 -0000 On Mon, 6 Apr 2015, Sergey V. Dyatko wrote: > On Fri, 3 Apr 2015 20:15:29 -0700 > Kevin Oberman wrote: > >> And I keep meaning to write a tcsh completion script for pkg. Maybe I'll >> get to at least a basic one next week. I see that bash completion scripts >> are quite different, but I'll see if the _pkg.bash file can at least get me >> started. It does more than I'd probably get done in the first pass. >> -- >> Kevin Oberman, Network Engineer, Retired >> E-mail: rkoberman@gmail.com > > Long time ago I started to do that: > https://github.com/yoursbofh/pkgng-tcsh/blob/master/dot.cshrc_pkg > but ENOTIME and so on :) I would be very glad if someone will continue This does some of it. More would be welcome. Sorry about the wrap: set pkgcmds=(help add annotate audit autoremove backup check clean convert create delete fetch info install lock plugins \ query register repo rquery search set shell shlib stats unlock update updating upgrade version which) alias __pkgs 'pkg info -q' # aliases that show lists of possible completions including both package names and options alias __pkg-check-opts '__pkgs | xargs echo -B -d -s -r -y -v -n -a -i g x' alias __pkg-del-opts '__pkgs | xargs echo -a -D -f -g -i -n -q -R -x -y' alias __pkg-info-opts '__pkgs | xargs echo -a -A -f -R -e -D -g -i -x -d -r -k -l -b -B -s -q -O -E -o -p -F' alias __pkg-which-opts '__pkgs | xargs echo -q -o -g' complete pkg 'p/1/$pkgcmds/' \ 'n/check/`__pkg-check-opts`/' \ 'N/check/`__pkgs`/' \ 'n/delete/`__pkg-del-opts`/' \ 'N/delete/`__pkgs`/' \ 'n/help/$pkgcmds/' \ 'n/info/`__pkg-info-opts`/' \ 'N/info/`__pkgs`/' \ 'n/which/`__pkg-which-opts`/' \ 'N/which/`__pkgs`/'