Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Oct 2012 16:59:38 +0100
From:      Chris Rees <crees@FreeBSD.org>
To:        Alex Keda <admin@lissyara.su>
Cc:        ports@freebsd.org, Baptiste Daroussin <bapt@freebsd.org>, ports-announce@freebsd.org, current@freebsd.org, Vincent Hoffman <vince@unsane.co.uk>
Subject:   Re: [HEADSUP] current switched by default to pkgng
Message-ID:  <CADLo83_19dZFVyxitUs8yRt37NGepF73opsLqzR29z_Oczg_7Q@mail.gmail.com>
In-Reply-To: <50816EE5.8090704@lissyara.su>
References:  <20121010134421.GI26497@ithaqua.etoilebsd.net> <5081661B.2090209@lissyara.su> <50816D59.1030706@unsane.co.uk> <50816EE5.8090704@lissyara.su>

next in thread | previous in thread | raw e-mail | index | archive | help
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:
>>> On 10.10.2012 17:44, Baptiste Daroussin wrote:
>>>> Hi all,
>>>>
>>>> If you are using the ports tree on a FreeBSD current setup, then you are
>>>> concerned by the announce.
>>>>
>>>> As nvidia-drivers has been fixed and is now properly working with pkgng, the
>>>> ports tree as been switch by default to use pkgng on FreeBSD Current based on
>>>> version >= 1000017 which was the version when we tested the switch code.
>>>>
>>>> Make sure to read UPDATING (from ports) to correctly migrate your system or find
>>>> instruction to make your system still running with legacy pkg_install tools.
>>>>
>>>> regards,
>>>> Bapt
>>>>
>>> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo83_19dZFVyxitUs8yRt37NGepF73opsLqzR29z_Oczg_7Q>