From 1363c2fcc312b2acbdd12853d560df8695b1f717 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Wed, 25 Oct 2000 12:30:16 +0000 Subject: use return value of _files, don't use ${PRE,SUF}FIX for globbing, complete all files as a default for co (3472) --- ChangeLog | 4 ++++ Completion/User/_rcs | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index b7ee13088..9c6fe0b79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2000-10-25 Sven Wischnowsky + * 3472: Completion/User/_rcs: use return value of _files, don't + use ${PRE,SUF}FIX for globbing, complete all files as a default + forco + * 13084: Src/Zle/complist.c: re-display list for cleanup only if we were in menu selection diff --git a/Completion/User/_rcs b/Completion/User/_rcs index d9280b11f..bbc8e02ac 100644 --- a/Completion/User/_rcs +++ b/Completion/User/_rcs @@ -1,12 +1,14 @@ #compdef co ci rcs -local nm=$compstate[nmatches] cmd="${words[1]:t}" - -[[ $cmd = ci || $cmd = rcs ]] && _files +local nm=$compstate[nmatches] cmd="${words[1]:t}" ret=1 if [[ $compstate[nmatches] -eq nm && -d RCS && $cmd != ci ]]; then local rep expl - rep=(RCS/$PREFIX*$SUFFIX,v(:t:s/\,v//)) - (( $#rep )) && _wanted files expl 'RCS file' compadd -a rep + rep=(RCS/*,v(:t:s/\,v//)) + (( $#rep )) && _wanted files expl 'RCS file' compadd -a rep && ret=0 fi + +[[ $cmd = ci || $cmd = rcs || ret -eq 1 ]] && _files && ret=0 + +return ret -- cgit 1.4.1