Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Dec 2012 02:31:53 +0900
From:      Hajimu UMEMOTO <ume@FreeBSD.org>
To:        Baptiste Daroussin <bapt@FreeBSD.org>
Cc:        svn-ports-head@FreeBSD.org, svn-ports-all@FreeBSD.org, ports-committers@FreeBSD.org
Subject:   Re: svn commit: r308418 - head/ports-mgmt/pkg
Message-ID:  <ygeobi53h12.wl%ume@mahoroba.org>
In-Reply-To: <201212071126.qB7BQqmX083846@svn.freebsd.org>
References:  <201212071126.qB7BQqmX083846@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Multipart_Sat_Dec__8_02:31:53_2012-1
Content-Type: text/plain; charset=US-ASCII

Hi,

>>>>> On Fri, 7 Dec 2012 11:26:52 +0000 (UTC)
>>>>> Baptiste Daroussin <bapt@FreeBSD.org> said:

bapt> Author: bapt
bapt> Date: Fri Dec  7 11:26:51 2012
bapt> New Revision: 308418
bapt> URL: http://svnweb.freebsd.org/changeset/ports/308418

bapt> Log:
bapt>   - update to 1.0.3
bapt>   - changes:
bapt>     * Accept to query _https._tcp srv records
bapt>     * Fix diskspace change calculation in pkg upgrade
bapt>     * Fix pkg info -s -F apackage
bapt>     * Better ABI determination
bapt>     * Fix pkg upgrade badly returning 0 in case of failure
bapt>     * Fix build with recent clang 3.2
bapt>   
bapt>   Feature safe:	yes

Could you include the attached patch?
- add support zsh completion for `help'.
- make zsh completion for 'stats' work.
- fix description of upgrade -y and -n.

Sincerely,

--Multipart_Sat_Dec__8_02:31:53_2012-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="patch-scripts_zsh___pkg"
Content-Transfer-Encoding: 7bit

Index: scripts/zsh/_pkg
diff -u scripts/zsh/_pkg.orig scripts/zsh/_pkg
--- scripts/zsh/_pkg.orig	2012-12-05 20:00:45.000000000 +0900
+++ scripts/zsh/_pkg	2012-12-08 02:20:43.344635971 +0900
@@ -14,6 +14,7 @@
 
 _pkg() {
 	local earlyargs subcmd
+	local subcmd_list cmd
 	earlyargs=(
 	'-d[Increment debug level]'
 	'-j[Execute pkg(1) inside a jail(8)]:jail:'
@@ -143,7 +144,13 @@
 				&& return 0
 			;;
 		(help)
-			# TODO
+			subcmd_list=( $(
+				for cmd in $subcmd[@]; do
+					print ${cmd/\[*/}
+				done
+				) )
+			_arguments -s \
+				':command:_values -S " " -w "pkg subcommands" $subcmd_list[@]'
 			return 0
 			;;
 		(info)
@@ -249,7 +256,7 @@
 			_arguments -s \
 				'-q[Be quiet]' \
 				'(-l)-r[Display stats only for the local package database]' \
-				'(-r)-l[Display stats only for the remote package database(s)' \
+				'(-r)-l[Display stats only for the remote package database(s)]' \
 				&& return 0
 			;;
 		(update)
@@ -267,8 +274,8 @@
 			;;
 		(upgrade)
 			_arguments -s \
-				'(-y)-n[Assume yes when asked for confirmation]' \
-				'(-n)-y[Assume no (dry run) for confirmations]' \
+				'(-y)-n[Assume no (dry run) for confirmations]' \
+				'(-n)-y[Assume yes when asked for confirmation]' \
 				'-f[Upgrade/Reinstall everything]' \
 				'-L[Do not try to update the repository metadata]' \
 				&& return 1

--Multipart_Sat_Dec__8_02:31:53_2012-1
Content-Type: text/plain; charset=US-ASCII


--
Hajimu UMEMOTO
ume@mahoroba.org  ume@{,jp.}FreeBSD.org
http://www.mahoroba.org/~ume/

--Multipart_Sat_Dec__8_02:31:53_2012-1--



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