summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMamoru Komachi <usata@gentoo.org>2004-08-17 21:37:04 +0000
committerMamoru Komachi <usata@gentoo.org>2004-08-17 21:37:04 +0000
commit27a97a94bea3a27bac5f314946cdc333d84742ca (patch)
tree5966ead039b15c5460485f818fb886b6f13a9519 /app-shells
parentgvm initial commit (Manifest recommit) (diff)
downloadgentoo-2-27a97a94bea3a27bac5f314946cdc333d84742ca.tar.gz
gentoo-2-27a97a94bea3a27bac5f314946cdc333d84742ca.tar.bz2
gentoo-2-27a97a94bea3a27bac5f314946cdc333d84742ca.zip
Fixed several bugs in completions. Thanks to baptux <bapt@ifrance.com> for the patch. See bug #60530.
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/zsh/ChangeLog7
-rw-r--r--app-shells/zsh/files/_gcc-config6
-rw-r--r--app-shells/zsh/files/_gentoolkit10
-rw-r--r--app-shells/zsh/files/_portage-200407304
4 files changed, 19 insertions, 8 deletions
diff --git a/app-shells/zsh/ChangeLog b/app-shells/zsh/ChangeLog
index 71f7b6a43777..ed2e4676b651 100644
--- a/app-shells/zsh/ChangeLog
+++ b/app-shells/zsh/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-shells/zsh
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/zsh/ChangeLog,v 1.57 2004/08/15 11:23:21 usata Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/zsh/ChangeLog,v 1.58 2004/08/17 21:37:04 usata Exp $
+
+ 18 Aug 2004; Mamoru KOMACHI <usata@gentoo.org> files/_gcc-config,
+ files/_gentoolkit, files/_portage-20040730:
+ Fixed several bugs in completions. Thanks to baptux <bapt@ifrance.com>
+ for the patch. See bug #60530.
*zsh-4.2.1 (15 Aug 2004)
diff --git a/app-shells/zsh/files/_gcc-config b/app-shells/zsh/files/_gcc-config
index 68e61e70bbdd..695a77691f7f 100644
--- a/app-shells/zsh/files/_gcc-config
+++ b/app-shells/zsh/files/_gcc-config
@@ -14,11 +14,13 @@ arguments=(
'(- :)'{--get-stdcxx-incdir,-X}'[print g++ include path of given/current profile]:profiles:_gcc_profile'
'(- :)'{--help,-h}'[show help]'
'(- :)'{--version,-v}'[show version info]'
- '(- :)'':profiles:_gcc_profile'
+ '(- :):profiles:_gcc_profile'
)
_gcc_profile(){
- profile=$(_call_program tag gcc-config --list-profiles | sed -r -e 's/(\[([^]]*)\]) //g')
+ local profile
+ profile=$(_call_program tag gcc-config --list-profiles)
+ profile=${profile/\[([^]]*)\]/}
_tags profile && { compadd "$@" -k profile || compadd "$@" ${(kv)=profile} }
}
diff --git a/app-shells/zsh/files/_gentoolkit b/app-shells/zsh/files/_gentoolkit
index 37faa6af418d..25c36f2d1bdc 100644
--- a/app-shells/zsh/files/_gentoolkit
+++ b/app-shells/zsh/files/_gentoolkit
@@ -4,7 +4,11 @@
#Function to show gensync overlays located in /etc/gensync
_overlays(){
- overlay=$(grep -h id= /etc/gensync/* | sed -e 's/id="\(.*\)"$/\1/')
+ local overlay gensynclist gensync_individual
+ gensynclist=(/etc/gensync/*.syncsource)
+ foreach gensync_individual ($gensynclist)
+ overlay=($overlay ${${${(M)${(f)"$(<$gensync_individual)"}##id=*}/id=\"/}%\"})
+ end
_tags overlay && { compadd "$@" ${(kv)=overlay} }
}
@@ -58,7 +62,7 @@ case $service in
'()'{--no-color,-C}'[turn off colours]:overlays:_overlays' \
'(- :)'{--help,-h}'[show help]' \
'(- :)'{--version,-V}'[display version info]' \
- '(- :)'':overlays:_overlays'
+ '(- :):overlays:_overlays'
;;
qpkg)
@@ -68,7 +72,7 @@ case $service in
find=( --find-file -f --find-pattern -fp )
dups=( --dups -d --slot -s)
- _arguments \
+ _arguments -s \
"($check $excl $find $dups 1)"{--find-file,-f}"[finds package that owns file]:file:_files" \
"($check $excl $find $dups 1)"{--find-pattern,-fp}"[finds package that owns file matching pattern]:pattern:" \
"($excl $check $arg $find --dups -d )"{--dups,-d}"[print packages that have multiple versions installed]" \
diff --git a/app-shells/zsh/files/_portage-20040730 b/app-shells/zsh/files/_portage-20040730
index 558dcf522e45..f02ee5c24240 100644
--- a/app-shells/zsh/files/_portage-20040730
+++ b/app-shells/zsh/files/_portage-20040730
@@ -1,6 +1,6 @@
#compdef emerge rc-update rc-status ebuild opengl-update rc quickpkg
-# $Id: _portage-20040730,v 1.2 2004/08/15 11:23:21 usata Exp $
+# $Id: _portage-20040730,v 1.3 2004/08/17 21:37:04 usata Exp $
# ZSH completion function for Portage
# Author: baptux <bapt@ifrance.com>
@@ -332,7 +332,7 @@ _actions() {
'world[Represent all packages in the world profiles]' \
'system[Represent all the system packages]'
}
-
+local portage_pkglist gentoo_runlevels portdir pkgdir portdir_overlay overlay
#Reading informations from make.conf
[[ -n "${PORTDIR}" ]] && portdir="${PORTDIR}"
[[ -n "${PKGDIR}" ]] && pkgdir="${PKGDIR}"