From owner-freebsd-pkg@FreeBSD.ORG Wed Apr 8 06:39:45 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 36B5377F for ; Wed, 8 Apr 2015 06:39:45 +0000 (UTC) Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECFC0143 for ; Wed, 8 Apr 2015 06:39:44 +0000 (UTC) Received: by igbqf9 with SMTP id qf9so30923510igb.1 for ; Tue, 07 Apr 2015 23:39:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Fl+Kv9omAtzhzpI6JbGfzfPWvvoE8PoOQ/sOguhtcYI=; b=VfNWSOjMwJsLbbA+0a62QQjyGsC3SLgHq8QCwNhxK0IL375WXnL5b9ytpwbGOyXMQh ixuISslt181TTGlmyvadYaWGA2v3oTeLH8uaF61XRQo6sOsc3emmhlDXL2pSqrptI4ZL TeTzi/pBiLmf8nztc96INryMuKV6WoZsn53TdxzEn3eQ5v/KRTOdVo8zpwxDmhkxSglB RfdbrFHsMN9kMXb2PF7I8XbpglaK5tDO+Y50HraQqQPbtueEHG/rXzjAjweRvAMRb7X1 f7Mfot2v8RoUdIOmwLTrxc85zASFsQrfvS1BgqWeMTuD9ffyjg/s03GNGBZ13fN0T5J4 71IQ== MIME-Version: 1.0 X-Received: by 10.42.91.10 with SMTP id n10mr31180886icm.23.1428475184416; Tue, 07 Apr 2015 23:39:44 -0700 (PDT) Sender: kob6558@gmail.com Received: by 10.107.174.86 with HTTP; Tue, 7 Apr 2015 23:39:44 -0700 (PDT) In-Reply-To: References: <20150402201909.GD30115@ivaldir.etoilebsd.net> <20150406093428.7027c046@laptop.minsk.domain> Date: Tue, 7 Apr 2015 23:39:44 -0700 X-Google-Sender-Auth: JwWu2YevDrBETuaGVUF9r3YKMAs Message-ID: Subject: Re: Share your pkg aliases From: Kevin Oberman To: Warren Block Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: pkg 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: Wed, 08 Apr 2015 06:39:45 -0000 On Mon, Apr 6, 2015 at 5:12 PM, Warren Block wrote: > 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`/' > Thank you! You seem to have done almost exactly what I had started on and was planning on. I will try to add come of the commands still not handled and update some that are. (Where is my copy of "csh and tcsh"?) I will be moving in two weeks and I may have already packed it up.) -- Kevin Oberman, Network Engineer, Retired E-mail: rkoberman@gmail.com