Date: Tue, 7 Apr 2015 23:39:44 -0700 From: Kevin Oberman <rkoberman@gmail.com> To: Warren Block <wblock@wonkity.com> Cc: pkg <pkg@freebsd.org> Subject: Re: Share your pkg aliases Message-ID: <CAN6yY1sU=cEtAfwdZR-Nc4Trv8KbYx96afTyP2K4v0eVkw-eMA@mail.gmail.com> In-Reply-To: <alpine.BSF.2.20.1504061808420.72595@wonkity.com> References: <20150402201909.GD30115@ivaldir.etoilebsd.net> <CAG=rPVf-wJHVbB5ivL_GcK1ahz8cdFW1BNwfO6jfGfqhc0OFWg@mail.gmail.com> <CAN6yY1ux0diXK-5kFVshSkCi9FPe0jik_DkB9QgT2AxF=9sWsA@mail.gmail.com> <20150406093428.7027c046@laptop.minsk.domain> <alpine.BSF.2.20.1504061808420.72595@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 6, 2015 at 5:12 PM, Warren Block <wblock@wonkity.com> wrote: > On Mon, 6 Apr 2015, Sergey V. Dyatko wrote: > > On Fri, 3 Apr 2015 20:15:29 -0700 >> Kevin Oberman <rkoberman@gmail.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1sU=cEtAfwdZR-Nc4Trv8KbYx96afTyP2K4v0eVkw-eMA>