Re: [HEADSUP] current switched by default to pkgng

看板FB_current作者時間13年前 (2012/10/20 16:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串32/42 (看更多)
On 20.10.2012 11:23, Sergey V. Dyatko wrote: > On Fri, 19 Oct 2012 20:32:31 +0400 > Alex Keda <admin@lissyara.su> wrote: > >> On 19.10.2012 20:21, Alex Keda wrote: >>> On 19.10.2012 19:59, Chris Rees wrote: >>>> On 19 October 2012 16:16, Alex Keda <admin@lissyara.su> wrote: >>>>> On 19.10.2012 19:10, Vincent Hoffman wrote: >>>>>> On 19/10/2012 15:39, Alex Keda wrote: >>>>>>> pkg command does not have key for list options - no >>>>>>> autocompletions >>>>>>> >>>>>>> for example, for service command, I use >>>>>>> complete service 'n/*/`service -l`/' >>>>>>> in .cshrc >>>>>>> >>>>>>> what I can use for pkg command? >>>>>> >>>>>> horrible but working example >>>>>> pkg help 2>&1 | sed -e '1,/Commands supported:/d ; /For more >>>>>> information on the different commands/,$d; s/^ *// ; >>>>>> s/ .*.*$// ;/^$/d' >>>>>> >>>>>> There's bound to be better ways, I was just bored enough to >>>>>> knock this up. note s/^ *// is a tab, while s/ .*.*$// is >>>>>> 2 spaces dont think our sed has any other way to express tab >>>>>> other than an actual tab (ctrl-v then tab on the command line) >>>>> >>>>> it's crazy =) >>>>> may be add -l options? >>>> >>>> For Bourne-style shell: >>>> `pkg help 2>&1 | sed -nE 's,^ +(.*),\1,p'` >>>> >>>> For csh-style shell: >>>> `pkg help | & sed -nE 's,^ +(.*),\1,p'` >>>> >>>> where the bit between ^ and + is a tab character. You can type the >>>> tab character on a command prompt by using Ctrl+V then tab, or just >>>> type it normally in the script. >>>> >>>> Hope that helps in the meantime. >>>> >>>> Chris >>>> >>> dc7700p# pkg >>> -c Displays Performs a and >>> check debug from inside local >>> package packages remote search system >>> updating >>> -d Displays Performs a and >>> ......... skipped ........ >>> Displays Opens a against catalogues >>> debug from inside link package >>> packages register search system update >>> dc7700p# >>> dc7700p# grep pkg /root/.cshrc >>> complete pkg 'n/*/`pkg help |& sed -nE "s,^ >>> +(.*),\1,p"`/' >>> >>> some not work... I try my own string: >>> complete pkg 'n/*/`pkg help |& grep "Commands supported:" >>> --after-context=100 | grep "^\s" | awk "{print $1}"`/' >>> >>> output identical. maybe pipe not work in this place? >>> _______________________________________________ >>> freebsd-current@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-current >>> To unsubscribe, send any mail to >>> "freebsd-current-unsubscribe@freebsd.org" >>> >> >> it's a good crutch =) >> >> dc7700p# pkg >> add autoremove check create fetch info >> query remove rquery set shlib update upgrade >> which >> audit backup clean delete help install >> register repo search shell stats updating >> version >> dc7700p# pkg >> dc7700p# grep pkg /root/.cshrc >> complete pkg 'n/*/`pkg help |& grep "Commands supported:" >> --after-context=100 | grep "^\s" | cut -d " " -f 1`/' >> dc7700p# >> >> > > https://github.com/yoursbofh/pkgng-tcsh/blob/master/dot.cshrc_pkg > > Unfortunately, I do not know how to do something like `pkg command > <-keys> <pkgname>` > > i.e. > 'n/audit/' 'c/-/(F q)/' '`pkg query "%n-%v"`/' > doesn't work :( > > [tiger@laptop]:~%pkg audit [tab] > Missing separator '/' after completion "". > > > need escape ' _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1GWc63_l (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1GWc63_l (FB_current)