From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Sep 12 12:00:03 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76CC81065672 for ; Fri, 12 Sep 2008 12:00:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 42C528FC1D for ; Fri, 12 Sep 2008 12:00:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m8CC038H059462 for ; Fri, 12 Sep 2008 12:00:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m8CC03C6059461; Fri, 12 Sep 2008 12:00:03 GMT (envelope-from gnats) Resent-Date: Fri, 12 Sep 2008 12:00:03 GMT Resent-Message-Id: <200809121200.m8CC03C6059461@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Shota Iwazaki Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D74C106564A for ; Fri, 12 Sep 2008 11:50:53 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id E31DA8FC18 for ; Fri, 12 Sep 2008 11:50:52 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m8CBoq7C028675 for ; Fri, 12 Sep 2008 11:50:52 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m8CBoqkl028674; Fri, 12 Sep 2008 11:50:52 GMT (envelope-from nobody) Message-Id: <200809121150.m8CBoqkl028674@www.freebsd.org> Date: Fri, 12 Sep 2008 11:50:52 GMT From: Shota Iwazaki To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/127319: [PATCH] portmaster - add completion for zsh X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2008 12:00:03 -0000 >Number: 127319 >Category: ports >Synopsis: [PATCH] portmaster - add completion for zsh >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Sep 12 12:00:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Shota Iwazaki >Release: 8.0-CURRENT >Organization: >Environment: FreeBSD truth.local 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Tue Sep 9 21:26:37 JST 2008 root@truth.local:/usr/obj/usr/src/sys/CUSTOM amd64 >Description: add completion code "_portmaster" for zsh. >How-To-Repeat: >Fix: Patch attached with submission follows: diff -urN portmaster.orig/Makefile portmaster/Makefile --- portmaster.orig/Makefile 2008-09-12 01:22:09.000000000 +0900 +++ portmaster/Makefile 2008-09-12 18:10:05.000000000 +0900 @@ -9,6 +9,7 @@ PORTNAME= portmaster PORTVERSION= 2.6 +PORTREVISION= 1 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none @@ -19,12 +20,14 @@ NO_BUILD= yes SUB_FILES= portmaster.sh -PLIST_FILES= sbin/portmaster +PLIST_FILES= sbin/portmaster\ + share/zsh/site-functions/_portmaster MAN8= portmaster.8 do-install: ${INSTALL_SCRIPT} ${WRKDIR}/portmaster.sh ${PREFIX}/sbin/portmaster ${INSTALL_MAN} ${FILESDIR}/portmaster.8 ${MAN8PREFIX}/man/man8 + ${INSTALL_DATA} ${FILESDIR}/_portmaster ${PREFIX}/share/zsh/site-functions .include diff -urN portmaster.orig/files/_portmaster portmaster/files/_portmaster --- portmaster.orig/files/_portmaster 1970-01-01 09:00:00.000000000 +0900 +++ portmaster/files/_portmaster 2008-09-12 20:31:16.000000000 +0900 @@ -0,0 +1,66 @@ +#compdef portmaster + +(( $+functions[_portmaster_pkgs] )) || +_portmaster_pkgs() { + compadd "$@" - ${PKG_DBDIR:-/var/db/pkg}/*(/:t) +} + +(( $+functions[_portmaster_ports] )) || +_portmaster_ports() { + local ret=1 + + _files "$@" -W ${PORTSDIR:-/usr/ports} -/ && ret=0 + + return ret +} + +(( $+functions[_portmaster_pkgs_and_ports] )) || +_portmaster_pkgs_and_ports() { + local ret=1 + + _portmaster_pkgs && ret=0 + _portmaster_ports && ret=0 + + return ret +} + +_portmaster() { + _arguments -A "-*" \ + "(-G)--force-config[run 'make config' for all ports]" \ + '(-b)-B[prevents creation of the backup package for the installed port]' \ + "-C[prevents 'make clean' from being run before building]" \ + "(--force-config)-G[prevents the recursive 'make config']" \ + '-H[hide details of the port build and install in a log file]' \ + "-K[prevents 'make clean' from being run after building]" \ + '(-B)-b[create and keep a backup package of an installed port]' \ + '-g[create a package of the new port]' \ + '-n[run through configure, but do not make or install any ports]' \ + '-t[recurse dependencies thoroughly, using all-depends-list]' \ + '-v[verbose output]' \ + '-w[save old shared libraries before deinstall]' \ + '-u[unattended mode]' \ + '(-i)-f[always rebuild ports]' \ + '(-f)-i[interactive update mode]' \ + '(-d)-D[no cleaning of distfiles]' \ + '(-D)-d[always clean distfiles]' \ + '-m[any arguments to supply to make]:arguments for make:' \ + '-x[avoid building or updating ports that match this pattern]:glob pattern to exclude from building:' \ + '-p[specify the full path to a port directory]:a port directory:' \ + '--show-work[show what dependent ports are, and are not installed]' \ + '-o[replace the installed port with a port from a different origin]::_portmaster_ports' \ + '-r[rebuild the specified port, and all ports that depend on it]:name/glob of port:_portmaster_pkgs' \ + '-R[restart an update, skipping ports already up to date]' \ + '-a[check all ports, update as necessary]' \ + '-l[list all installed ports by category]' \ + '-L[list all installed ports by category, and search for updates]' \ + '-e[expunge port using pkg_delete, and remove all distfiles]:name of port:_portmaster_pkgs' \ + '-s[clean out stale ports that used to be depended on]' \ + '-F[fetch distfiles only]' \ + '--clean-distfiles[offer to delete stale files]' \ + '--check-depends[cross-check and update dependency information for all ports]' \ + '(-h --help)'{-h,--help}'[display help message]' \ + '--version[display the version only]' \ + '*:Packages and Ports:_portmaster_pkgs_and_ports' +} + +_portmaster "$@" >Release-Note: >Audit-Trail: >Unformatted: