summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/User/_rcs12
1 files changed, 7 insertions, 5 deletions
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