From d9b00a38701ff795a382020291dfed6c32b6d40e Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Fri, 16 Feb 2001 14:57:48 +0000 Subject: make `compdef foo=bar' use the service defined for `bar' if there is any (13494) --- ChangeLog | 5 +++++ Completion/Core/compinit | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 918efedfe..65348f35c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-02-16 Sven Wischnowsky + + * 13494: Completion/Core/compinit: make `compdef foo=bar' use the + service defined for `bar' if there is any + 2001-02-16 Bart Schaefer * 13492: Src/subst.c: Partial fix for ${1+"$@"} expanding to diff --git a/Completion/Core/compinit b/Completion/Core/compinit index e9e2c93ee..96779d7f7 100644 --- a/Completion/Core/compinit +++ b/Completion/Core/compinit @@ -249,6 +249,7 @@ compdef() { cmd="${i%%\=*}" svc="${i#*\=}" func="$_comps[${(k)_services[(R)$svc]:-$svc}]" + (( $+_services[$svc] )) && svc=$_services[$svc] [[ -z "$func" ]] && func="${_patcomps[(K)$svc][1]:-${_postpatcomps[(K)$svc][1]}}" if [[ -n "$func" ]]; then -- cgit v1.2.3