Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: _cvs should complete dot-files (?)



After 7295 and 7296, the _cvs completer stopped matching files whose name
begins with a dot upon "cvs add".  This restores that behavior, and also
removes the now-extraneous assignment to $all.

I personally want dot-files completed here, but it might be nice to omit
them unless you've typed the leading dot yourself.  That behavior is at
the end as a uuencoded patch (so you can't accidentally apply both; they
conflict).

Index: Completion/User/_cvs
===================================================================
@@ -308,13 +308,12 @@
   if [[ -d ${pref}CVS ]]; then
     _cvsentries
     setopt localoptions unset
-    local all omit
-    all=( ${pref}*~${pref}CVS(D:t) )
+    local omit
     omit=( CVS $entries ${=cvsignore} )
     [[ -r ~/.cvsignore ]] && omit=( $omit $(<~/.cvsignore) )
     [[ -r ${pref}.cvsignore ]] && omit=( $omit $(<${pref}.cvsignore) )
-    compgen -g '*~(*/|)('${(j:|:)omit:q}')' ||
-    { _cvsdirentries; compgen -g '('${(j:|:)entries:q}')' }
+    compgen -g '*~(*/|)('${(j:|:)omit:q}')(D)' ||
+    { _cvsdirentries; compgen -g '('${(j:|:)entries:q}')(D)' }
   else
     _files
   fi


The first line of this uuencoded block is a compgen command cut'n'pasted
from xtrace output of the _cvsaddp function that results after applying
the patch in the rest of the block and then typing "cvs add Src/<TAB>" in
my zsh source tree.  3.1.6-test-3 dumps core with a garbaged stack (no
useful backtrace) while trying to execute that compgen.

begin 664 alternate._cvs.diff
M8V]M<&=E;B`M9R`H+EPC36%K969I;&4N:6XN,2XU?"Y<(TUA:V5F:6QE+FEN
M+C$N-GPN7"--86ME9FEL92YI;BXQ+C=\+EPC36%K96UO9"YI;BYI;BXQ+C-\
M+EPC8G5I;'1I;BYC+C$N,C9\+EPC8G5I;'1I;BYC+C$N,C=\+EPC8G5I;'1I
M;BYC+C$N,S)\+EPC8G5I;'1I;BYC+C$N,S9\+EPC8G5I;'1I;BYC+C$N-#%\
M+EPC8G5I;'1I;BYC+C$N-#-\+EPC8V]N9"YC+C$N-WPN7"-C;VYD+F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`@(%M;("UR('XO+F-V<VEG
M;F]R92!=72`F)B!O;6ET/2@@)&]M:70@)"@\?B\N8W9S:6=N;W)E*2`I"B`@
M("`@6UL@+7(@)'MP<F5F?2YC=G-I9VYO<F4@75T@)B8@;VUI=#TH("1O;6ET
M("0H/"1[<')E9GTN8W9S:6=N;W)E*2`I"BT@("`@8V]M<&=E;B`M9R`G*GXH
M*B]\*2@G)'LH:CI\.BEO;6ET.G%])RDG('Q\"BT@("`@>R!?8W9S9&ER96YT
M<FEE<SL@8V]M<&=E;B`M9R`G*"<D>RAJ.GPZ*65N=')I97,Z<7TG*2<@?0HK
M("`@(&-O;7!G96X@+6<@)R@G)'LH:CI\.BEA;&PZ<7TG*7XH*B]\*2@G)'LH
M:CI\.BEO;6ET.G%])RDG('Q\"BL@("`@>R!?8W9S9&ER96YT<FEE<SL@8V]M
M<&=E;B`M9R`G*"<D>RAJ.GPZ*65N=')I97,Z<7TG*2A$*2<@?0H@("!E;'-E
3"B`@("`@7V9I;&5S"B`@(&9I"@``
`
end

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author