From a267832ddf4150652fde3936858841bb2edbd9ae Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 25 Jun 2003 09:03:04 +0000 Subject: 18631: returning too early breaks prefix-needed style set to false --- Completion/Unix/Command/_sccs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Completion/Unix/Command/_sccs') diff --git a/Completion/Unix/Command/_sccs b/Completion/Unix/Command/_sccs index b3b6f49e9..40463b2f1 100644 --- a/Completion/Unix/Command/_sccs +++ b/Completion/Unix/Command/_sccs @@ -15,7 +15,7 @@ _sccs_files() { return ret } -local curcontext="$curcontext" state line +local curcontext="$curcontext" state line ret=1 typeset -A opt_args local subcmds ropt copt sfiles finalpath @@ -56,12 +56,13 @@ if [[ $service = sccs ]]; then '-r[run with real and not effective user ID]' \ '-d+[specify root prefix]:root prefix:_directories' \ '-p+[specify subdirectory of history file]:path to history file:_directories' \ - '*::command:->subcmd' && return 0 + '*::command:->subcmd' && ret=0 if (( CURRENT == 1 )); then - _describe -t commands 'sccs command' subcmds - return + _describe -t commands 'sccs command' subcmds && ret=0 fi + (( ret )) || return 0 + service="$words[1]" sfiles=':file:_sccs_files' curcontext="${curcontext%:*}-$service:" -- cgit v1.2.3