summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_cvs
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2015-05-05 23:32:59 +0200
committerAxel Beckert <abe@deuxchevaux.org>2015-05-05 23:58:59 +0200
commitdb38e167634b6c2217eec3a5aafc37c46d9e5a8d (patch)
treedaa342d423febbd3a5a7ef97053037677fab004a /Completion/Unix/Command/_cvs
parent01eea47617a6e06debdb4330f92ae69f92089fd2 (diff)
parent3c3c8d3d13fd4cf6c03f81ca8dc18a1efd561728 (diff)
downloadzsh-db38e167634b6c2217eec3a5aafc37c46d9e5a8d.tar.gz
zsh-db38e167634b6c2217eec3a5aafc37c46d9e5a8d.zip
Merge branch 'upstream' into debian
Diffstat (limited to 'Completion/Unix/Command/_cvs')
-rw-r--r--Completion/Unix/Command/_cvs13
1 files changed, 8 insertions, 5 deletions
diff --git a/Completion/Unix/Command/_cvs b/Completion/Unix/Command/_cvs
index 3c06e0481..31997ec09 100644
--- a/Completion/Unix/Command/_cvs
+++ b/Completion/Unix/Command/_cvs
@@ -704,15 +704,18 @@ _cvs_sub_modules() {
_cvs_run() {
local cvsroot="$1" dir="$2"
shift 2
- local d=/tmp/zsh-cvs-work-$$
- mkdir $d >&/dev/null
- cd $d
- mkdir CVS >&/dev/null
+ local d=${TMPPREFIX:-/tmp/zsh}-cvs-work-$$
+ rm -rf $d
+ mkdir $d &&
+ (
+ chmod 0700 $d &&
+ builtin cd -q $d &&
+ mkdir CVS >&/dev/null || return 1
print -r - "$cvsroot" > CVS/Root
print "$dir" > CVS/Repository
print D > CVS/Entries
CVS_IGNORE_REMOTE_ROOT= cvs "$@"
- cd $OLDPWD
+ )
rm -rf $d
}