From: Tanaka Akira <akr@jaist.ac.jp>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: _cvs
Date: 29 Jul 1999 02:23:37 +0900 [thread overview]
Message-ID: <rsqvhb4bsdi.fsf@crane.jaist.ac.jp> (raw)
Hm. Since cvsignore may have patterns instead of concrete filenames,
_cvs should not quote them.
--- Completion/User/_cvs Thu Jul 29 01:09:13 1999
+++ Completion/User/_cvs Thu Jul 29 02:17:47 1999
@@ -198,7 +198,7 @@
_cvsdirentries () {
setopt localoptions nullglob unset
if [[ -f ${pref}CVS/Entries ]]; then
- entries=( ${${${(M)${(f)"$(<${pref}CVS/Entries)"}:#D/*}#D/}%%/*} )
+ entries=( ${${${${(M)${(f)"$(<${pref}CVS/Entries)"}:#D/*}#D/}%%/*}:q} )
else
entries=()
fi
@@ -207,7 +207,7 @@
_cvsentries () {
setopt localoptions nullglob unset
if [[ -f ${pref}CVS/Entries ]]; then
- entries=( ${${${${(f)"$(<${pref}CVS/Entries)"}:#D}#(D|)/}%%/*} )
+ entries=( ${${${${${(f)"$(<${pref}CVS/Entries)"}:#D}#(D|)/}%%/*}:q} )
else
entries=()
fi
@@ -234,13 +234,13 @@
local OLDTZ="$TZ"; if ! (( $+TZ )); then unset OLDTZ; fi; export TZ=GMT
mtime=( ${(s:/:)${(j:/:)${${${${(M)${(f)Entries}:#/*}#/}%/*/*}/\\/*\\///}}} )
- entries=( ${${${(M)${(f)Entries}:#D/*}#D/}%%/*} )
+ entries=( ${${${${(M)${(f)Entries}:#D/*}#D/}%%/*}:q} )
builtin stat -n +mtime -F '%a %b %e %T %Y' "$pref${(@k)^mtime}" |
while read line
do
line=${line#$pref}
if [[ x"$mtime[${line%% *}]" != x"${line#* }" ]]; then
- entries=($entries "${line%% *}")
+ entries=($entries "${${line%% *}:q}")
fi
done
@@ -252,8 +252,8 @@
_cvsdirentries
case $#entries in
0) false;;
- 1) compgen "$@" -g "${entries:q}";;
- *) compgen "$@" -g '('${(j:|:)entries:q}')';;
+ 1) compgen "$@" -g "$entries";;
+ *) compgen "$@" -g '('${(j:|:)entries}')';;
esac
else
_files
@@ -267,8 +267,8 @@
_cvsentries
case $#entries in
0) false;;
- 1) compgen -g "${entries:q}";;
- *) compgen -g '('${(j:|:)entries:q}')';;
+ 1) compgen -g "$entries";;
+ *) compgen -g '('${(j:|:)entries}')';;
esac
else
_files
@@ -282,8 +282,8 @@
_cvsentries_modified
case $#entries in
0) false;;
- 1) compgen -g "${entries:q}";;
- *) compgen -g '('${(j:|:)entries:q}')';;
+ 1) compgen -g "$entries";;
+ *) compgen -g '('${(j:|:)entries}')';;
esac
else
_files
@@ -297,9 +297,9 @@
_cvsentries
setopt localoptions unset
local omit
- omit=( ${pref}*(D:t) )
- eval 'entries=( ${entries:#('${(j:|:)omit:q}')} )'
- compadd -P "$qpref" - ${entries:q} ||
+ omit=( ${pref}*(D:t:q) )
+ eval 'entries=( ${entries:#('${(j:|:)omit}')} )'
+ compadd -P "$qpref" - ${entries} ||
_cvsdirs
else
_files
@@ -316,8 +316,8 @@
omit=( CVS $entries ${=cvsignore} )
[[ -r ~/.cvsignore ]] && omit=( $omit $(<~/.cvsignore) )
[[ -r ${pref}.cvsignore ]] && omit=( $omit $(<${pref}.cvsignore) )
- compgen -g '*~(*/|)('${(j:|:)omit:q}')(D)' ||
- { _cvsdirentries; compgen -g '('${(j:|:)entries:q}')(D)' }
+ compgen -g '*~(*/|)('${(j:|:)omit}')(D)' ||
+ { _cvsdirentries; compgen -g '('${(j:|:)entries}')(D)' }
else
_files
fi
--
Tanaka Akira
next reply other threads:[~1999-07-28 17:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-07-28 17:23 Tanaka Akira [this message]
1999-07-28 17:50 ` Tanaka Akira
1999-09-08 14:56 Tanaka Akira
1999-09-09 8:23 Sven Wischnowsky
1999-09-09 8:50 ` Tanaka Akira
1999-09-09 9:14 Sven Wischnowsky
2000-05-16 0:06 Tanaka Akira
2002-09-06 15:23 Oliver Kiddle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=rsqvhb4bsdi.fsf@crane.jaist.ac.jp \
--to=akr@jaist.ac.jp \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).