mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-13 23:31:08 +02:00
zsh-3.1.6
This commit is contained in:
parent
14810d6df1
commit
61e68d70da
29 changed files with 710 additions and 240 deletions
97
ChangeLog
97
ChangeLog
|
@ -1,3 +1,100 @@
|
||||||
|
1999-08-01 Peter Stephenson <pws@ibmth.df.unipi.it>
|
||||||
|
|
||||||
|
* pws: Config/version.mk: zsh 3.1.6 released.
|
||||||
|
|
||||||
|
1999-07-30 Peter Stephenson <pws@ibmth.df.unipi.it>
|
||||||
|
|
||||||
|
* pws, Bart: 7321, 7325: Src/hist.c: NO_BANG_HIST wasn't working
|
||||||
|
at all, but be careful not to disable too much when it's
|
||||||
|
in effect.
|
||||||
|
|
||||||
|
* Tanaka Akira: 7318: Completion/User/_cvs: more improvements
|
||||||
|
|
||||||
|
1999-07-29 Peter Stephenson <pws@ibmth.df.unipi.it>
|
||||||
|
|
||||||
|
* pws: 7316: Doc/Zsh/compsys.yo: mention that compctl -M control
|
||||||
|
is available and fix some typos.
|
||||||
|
|
||||||
|
* pws: unposted: Doc/Zsh/metafaq.yo: sites in Italy and Poland
|
||||||
|
(the one in Italy is not `official', but is actively mirroring
|
||||||
|
ftp.zsh.org anyway).
|
||||||
|
|
||||||
|
* Felix Rosencrantz: 7311: Src/Zle/zle_tricky.c: matching control
|
||||||
|
left dangling pointers.
|
||||||
|
|
||||||
|
* Tanaka Akira: 7312: Completion/User/_cvs: don't quote ignore
|
||||||
|
patterns.
|
||||||
|
|
||||||
|
1999-07-28 Peter Stephenson <pws@ibmth.df.unipi.it>
|
||||||
|
|
||||||
|
* pws: 7308, 7309: Src/Zle/zle_tricky.c: glob patterns were
|
||||||
|
limited to PATH_MAX and length wasn't tested.
|
||||||
|
|
||||||
|
* Tanaka Akira: 7307: Completion/User/_cvs: remove parentheses,
|
||||||
|
complete argument options.
|
||||||
|
|
||||||
|
* pws: 7305: Doc/Zsh/zftpsys.yo, Functions/Zftp/zfanon,
|
||||||
|
Functions/Zftp/zfget, Functions/Zftp/zfopen,
|
||||||
|
Functions/Zftp/zftp_chpwd: use URL-style paths in opening;
|
||||||
|
zfget -c sends output to stdout; don't delete current directory
|
||||||
|
information if we haven't really changed directory.
|
||||||
|
|
||||||
|
* Bart: 7301: Completion/User/_cvs: restored .file completion
|
||||||
|
|
||||||
|
1999-07-27 Peter Stephenson <pws@ibmth.df.unipi.it>
|
||||||
|
|
||||||
|
* pws: 7300: Completion/Core/compdump: wasn't ignoring . in fpath,
|
||||||
|
although compinit was.
|
||||||
|
|
||||||
|
* pws: 7299: configure.in: don't use gcc -pedantic any more, since
|
||||||
|
there are too many messages about `long long' and variable-sized
|
||||||
|
arrays not being available in ISO C.
|
||||||
|
|
||||||
|
* pws: 7298: Src/Zle/zle_tricky.c: missing dupstring() in
|
||||||
|
comp_match.
|
||||||
|
|
||||||
|
* pws: 7297: Completion/Core/_path_files, Doc/Zsh/compsys.yo:
|
||||||
|
path_keepdir config key required for 7141 to come into effect
|
||||||
|
due to significant side effects.
|
||||||
|
|
||||||
|
* Tanaka Akira: 7290, 7292: Completion/User/_cvs: condensed
|
||||||
|
version of all _cvs completion stuff; completes files if not
|
||||||
|
under CVS control; use compgen -p to work around problem with
|
||||||
|
quoted characters.
|
||||||
|
|
||||||
|
* Andrej: 7827: Etc/Machines: Siemens info
|
||||||
|
|
||||||
|
* Bart: 7285, applied by hand: Completion/User/_cvs: parameter
|
||||||
|
fixes, commit bug.
|
||||||
|
|
||||||
|
* Tanaka Akira: 7284: Completion/Core/compdump: careful when
|
||||||
|
two shells start at once.
|
||||||
|
|
||||||
|
* Tanaka Akira: 7282: Completion/User/_cvs,
|
||||||
|
Completion/User/_cvsaddp, Completion/User/_cvsentries_modified,
|
||||||
|
Completion/User/_cvsprefix, Completion/User/_cvsremovep,
|
||||||
|
Completion/User/_cvstargets, Completion/User/_cvstargets_modified:
|
||||||
|
handle modified files using stat module.
|
||||||
|
|
||||||
|
1999-07-26 Peter Stephenson <pws@ibmth.df.unipi.it>
|
||||||
|
|
||||||
|
* Tanaka Akira: 7278: Completion/Base/_complete_opts:
|
||||||
|
less verbosity
|
||||||
|
|
||||||
|
1999-07-25 Peter Stephenson <pws@ibmth.df.unipi.it>
|
||||||
|
|
||||||
|
* Tanaka Akira: 7276, 7277, 7279: Completion/User/{_cvs, _cvsaddp,
|
||||||
|
_cvsentries, _cvsprefix, _cvsremovep, _cvsrepositories,
|
||||||
|
_cvsrevisions, _cvstargets, _cvstest}, Misc/compctl-examples:
|
||||||
|
more modular cvs new completion support including CVS/Entries;
|
||||||
|
bug fix for old CVS completion.
|
||||||
|
|
||||||
|
* Bart: 7275: Doc/intro.ms: now works with groff.
|
||||||
|
|
||||||
|
* Bart: 7274: Src/Zle/zle_tricky.c: don't go beyond end of line
|
||||||
|
|
||||||
|
* pws: from Bart: Etc/CONTRIBUTORS, Etc/NEWS: updates for 3.0.6
|
||||||
|
|
||||||
1999-07-24 Peter Stephenson <pws@ibmth.df.unipi.it>
|
1999-07-24 Peter Stephenson <pws@ibmth.df.unipi.it>
|
||||||
|
|
||||||
* pws: version 3.1.6-test-3
|
* pws: version 3.1.6-test-3
|
||||||
|
|
|
@ -81,7 +81,9 @@ case "${#no_arg}-${#with_arg}" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ -z "$done" ]]; then
|
if [[ -z "$done" ]]; then
|
||||||
|
if (( $+complete_opts_verbose )); then
|
||||||
compadd - -${(k)^option_pairs:gs/://}
|
compadd - -${(k)^option_pairs:gs/://}
|
||||||
|
fi
|
||||||
false
|
false
|
||||||
else
|
else
|
||||||
true
|
true
|
||||||
|
|
|
@ -260,7 +260,14 @@ for prepath in "$prepaths[@]"; do
|
||||||
# original string in such a case so that the command line doesn't
|
# original string in such a case so that the command line doesn't
|
||||||
# change but other completers still think there are matches.
|
# change but other completers still think there are matches.
|
||||||
|
|
||||||
if [[ -z "$tpre$tsuf" && "$pre" = */ && -z "$suf" ]]; then
|
# Problem: this seems to stop _files from finding directory
|
||||||
|
# completions if there were no file completions, for
|
||||||
|
# example `_files *(*)' no longer completes subdirectories after
|
||||||
|
# a /. For now, make this a configuration option, but
|
||||||
|
# probably it needs to be done better.
|
||||||
|
|
||||||
|
if [[ -n "$compconfig[path_keepdir]" && -z "$tpre$tsuf" &&
|
||||||
|
"$pre" = */ && -z "$suf" ]]; then
|
||||||
compadd -nQS '' - "$linepath$donepath$orig"
|
compadd -nQS '' - "$linepath$donepath$orig"
|
||||||
tmp4=-
|
tmp4=-
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -17,10 +17,10 @@ emulate -L zsh
|
||||||
|
|
||||||
typeset _d_file _d_f _d_bks _d_line _d_als
|
typeset _d_file _d_f _d_bks _d_line _d_als
|
||||||
|
|
||||||
_d_file=${compconfig[dumpfile]-${0:h}/compinit.dump}
|
_d_file=${compconfig[dumpfile]-${0:h}/compinit.dump}.$HOST.$$
|
||||||
|
|
||||||
typeset -U _d_files
|
typeset -U _d_files
|
||||||
_d_files=( ${^~fpath}/_(|*[^~])(N:t) )
|
_d_files=( ${^~fpath:/.}/_(|*[^~])(N:t) )
|
||||||
|
|
||||||
print "#files: $#_d_files" > $_d_file
|
print "#files: $#_d_files" > $_d_file
|
||||||
|
|
||||||
|
@ -88,5 +88,7 @@ done >> $_d_file
|
||||||
|
|
||||||
print >> $_d_file
|
print >> $_d_file
|
||||||
|
|
||||||
|
mv $_d_file ${_d_file%.$HOST.$$}
|
||||||
|
|
||||||
unfunction compdump
|
unfunction compdump
|
||||||
autoload -U compdump
|
autoload -U compdump
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
DISTFILES_SRC='
|
DISTFILES_SRC='
|
||||||
.distfiles
|
.distfiles
|
||||||
_a2ps _bzip2 _bunzip2 _chown _compress _configure _cvs _dd _dvi _find
|
_a2ps _bzip2 _bunzip2 _chown _compress _configure
|
||||||
_gdb _groups _gunzip _gzip
|
_cvs _dd _dvi _find _gdb _groups _gunzip _gzip
|
||||||
_hosts _use_lo _make _man _mh _pdf _ps
|
_hosts _use_lo _make _man _mh _pdf _ps
|
||||||
_rcs _rlogin _sh _strip _stty _su
|
_rcs _rlogin _sh _strip _stty _su
|
||||||
_tar _tar_archive _tex _uncompress _x_options _xfig
|
_tar _tar_archive _tex _uncompress _x_options _xfig
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#compdef cvs
|
#compdef cvs
|
||||||
|
|
||||||
|
_cvs () {
|
||||||
setopt localoptions extendedglob
|
setopt localoptions extendedglob
|
||||||
|
|
||||||
typeset -A commands
|
typeset -A commands
|
||||||
|
@ -17,52 +18,67 @@ local com="${words[(i)(${(j:|:)${(kv)=commands}})]}"
|
||||||
|
|
||||||
local showlist='compstate[list]=list; compstate[force_list]=yes'
|
local showlist='compstate[list]=list; compstate[force_list]=yes'
|
||||||
local showhint="$showlist ; compstate[insert]=''"
|
local showhint="$showlist ; compstate[insert]=''"
|
||||||
local complete_D="compadd yesterday week\\ ago month\\ ago"
|
local complete_D="compadd today yesterday week\\ ago month\\ ago"
|
||||||
local complete_k="compadd kv kvl k o b v"
|
local complete_k="compadd kv kvl k o b v"
|
||||||
local complete_r="compadd -UX 'Enter tag name or rev number' ''; $showhint"
|
local complete_r="_cvsrevisions"
|
||||||
local complete_m="compadd -UX 'Enter log message' -n ''; $showhint"
|
local complete_m="compadd -UX 'Enter log message' -n ''; $showhint"
|
||||||
|
|
||||||
|
|
||||||
if (( com < CURRENT )); then
|
if (( com < CURRENT )); then
|
||||||
case "$words[$com]" in
|
case "$words[$com]" in
|
||||||
add|ad|new) # "+k:m:"
|
add|ad|new) # "+k:m:"
|
||||||
_complete_opts k: "$complete_k" m: "$complete_m" || _files
|
_complete_opts k: "$complete_k" m: "$complete_m" || _cvsaddp
|
||||||
;;
|
;;
|
||||||
admin|adm|rcs) # "+ib::c:a:A:e:l::u::LUn:N:m:o:s:t::IqxV:k:"
|
admin|adm|rcs) # "+ib::c:a:A:e:l::u::LUn:N:m:o:s:t::IqxV:k:"
|
||||||
_complete_opts i '' b:: '' c: '' a: '' A: '' e: '' l:: '' u:: '' L '' U '' n: '' N: '' m: "$complete_m" o: '' s: '' t:: '' I '' q '' x '' V: '' k: "$complete_k" || _files
|
_complete_opts i '' b:: '' c: '' a: '' A: '' e: '' l:: '' u:: '' L '' \
|
||||||
|
U '' n: '' N: '' m: "$complete_m" o: '' s: '' t:: '' I '' q '' x '' \
|
||||||
|
V: '' k: "$complete_k" ||
|
||||||
|
_cvstargets
|
||||||
;;
|
;;
|
||||||
annotate|ann) # "+lr:D:fR"
|
annotate|ann) # "+lr:D:fR"
|
||||||
_complete_opts l '' r: '' D: '' f '' R '' || _files
|
_complete_opts l '' r: "$complete_r" D: "$complete_D" f '' R '' ||
|
||||||
|
_cvstargets
|
||||||
;;
|
;;
|
||||||
checkout|co|get) # "+ANnk:d:flRpQqcsr:D:j:P"
|
checkout|co|get) # "+ANnk:d:flRpQqcsr:D:j:P"
|
||||||
_complete_opts A '' N '' n '' k: "$complete_k" d: '' f '' l '' R '' p '' Q '' q '' c '' s '' r: "$complete_r" D: "$complete_D" j: '' P '' || compadd MODULE
|
_complete_opts A '' N '' n '' k: "$complete_k" d: '_files -/' f '' \
|
||||||
|
l '' R '' p '' Q '' q '' c '' s '' r: "$complete_r" D: "$complete_D" \
|
||||||
|
j: "$complete_r" P '' ||
|
||||||
|
_cvsrepositories
|
||||||
;;
|
;;
|
||||||
commit|ci|com) # "+nlRm:fF:r:"
|
commit|ci|com) # "+nlRm:fF:r:"
|
||||||
_complete_opts n '' l '' R '' m: "$complete_m" f '' F: '' r: "$complete_r" || _files
|
_complete_opts n '' l '' R '' m: "$complete_m" f '' F: _files \
|
||||||
|
r: "$complete_r" ||
|
||||||
|
_cvstargets_modified
|
||||||
;;
|
;;
|
||||||
diff|di|dif) # "+abcdefhilnpstuw0123456789BHNRC:D:F:I:L:U:V:W:k:r:"
|
diff|di|dif) # "+abcdefhilnpstuw0123456789BHNRC:D:F:I:L:U:V:W:k:r:"
|
||||||
_complete_opts a '' b '' c '' d '' e '' f '' h '' i '' l '' n '' p '' s '' t '' u '' w '' 0 '' 1 '' 2 '' 3 '' 4 '' 5 '' 6 '' 7 '' 8 '' 9 '' B '' H '' N '' R '' C: '' D: "$complete_D" F: '' I: '' L: '' U: '' V: '' W: '' k: "$complete_k" r: "$complete_r" || _files
|
_complete_opts a '' b '' c '' d '' e '' f '' h '' i '' l '' n '' p '' \
|
||||||
|
s '' t '' u '' w '' 0 '' 1 '' 2 '' 3 '' 4 '' 5 '' 6 '' 7 '' 8 '' \
|
||||||
|
9 '' B '' H '' N '' R '' C: '' D: "$complete_D" F: '' I: '' L: '' \
|
||||||
|
U: '' V: '' W: '' k: "$complete_k" r: "$complete_r" ||
|
||||||
|
_cvstargets_modified || _cvstargets
|
||||||
;;
|
;;
|
||||||
edit) # "+lRa:"
|
edit) # "+lRa:"
|
||||||
_complete_opts l '' R '' a: '' || _files
|
_complete_opts l '' R '' a: 'compadd edit unedit commit all none' ||
|
||||||
|
_cvstargets
|
||||||
;;
|
;;
|
||||||
editors) # "+lR"
|
editors) # "+lR"
|
||||||
_complete_opts l '' R '' || _files
|
_complete_opts l '' R '' || _cvstargets
|
||||||
;;
|
;;
|
||||||
export|exp|ex) # "+ANnk:d:flRpQqcsr:D:j:P"
|
export|exp|ex) # "+Nnk:d:flRQqr:D:"
|
||||||
_complete_opts A '' N '' n '' k: "$complete_k" d: '' f '' l '' R '' p '' Q '' q '' c '' s '' r: "$complete_r" D: "$complete_D" j: '' P '' || compadd MODULE
|
_complete_opts N '' n '' k: "$complete_k" d: '_files -/' f '' l '' \
|
||||||
|
R '' Q '' q '' r: "$complete_r" D: "$complete_D" ||
|
||||||
|
_cvsrepositories
|
||||||
;;
|
;;
|
||||||
history|hi|his) # "+Tacelow?D:b:f:m:n:p:r:t:u:x:X:z:"
|
history|hi|his) # "+Tacelow?D:b:f:m:n:p:r:t:u:x:X:z:"
|
||||||
_complete_opts T '' a '' c '' e '' l '' o '' w '' \? '' D: "$complete_D" b: '' f: '' m: "$complete_m" n: '' p: '' r: '' t: '' u: '' x: '' X: '' z: '' || _files
|
_complete_opts T '' a '' c '' e '' l '' o '' w '' \? '' \
|
||||||
|
D: "$complete_D" b: '' f: '' m: "$complete_m" n: '' p: '' r: '' \
|
||||||
|
t: '' u: '' x: '' X: '' z: '' ||
|
||||||
|
_cvstargets
|
||||||
;;
|
;;
|
||||||
import|im|imp) # "+Qqdb:m:I:k:W:"
|
import|im|imp) # "+Qqdb:m:I:k:W:"
|
||||||
_complete_opts Q '' q '' d '' b: '' m: "$complete_m" I: '' k: "$complete_k" W: '' || case $[CURRENT-com] in
|
_complete_opts Q '' q '' d '' b: '' m: "$complete_m" I: _files \
|
||||||
1) if [[ "${+CVSROOT}" == 1 && "$CVSROOT" != :* ]]; then
|
k: "$complete_k" W: '' ||
|
||||||
compgen -X "Enter repository name" -W "$CVSROOT" -g '*~*CVSROOT(/)' -s ''
|
case $[CURRENT-com] in
|
||||||
else
|
1) _cvsrepositories;;
|
||||||
compadd -UX "Enter repository name" -n '' && eval "$showhint"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
2) compadd -UX "Enter vendor tag name" -n '' && eval "$showhint";;
|
2) compadd -UX "Enter vendor tag name" -n '' && eval "$showhint";;
|
||||||
3) compadd -UX "Enter release tag name" -n '' && eval "$showhint";;
|
3) compadd -UX "Enter release tag name" -n '' && eval "$showhint";;
|
||||||
*) compadd -UX "No futher arguments used" -n '' && eval "$showhint";;
|
*) compadd -UX "No futher arguments used" -n '' && eval "$showhint";;
|
||||||
|
@ -75,25 +91,32 @@ if (( com < CURRENT )); then
|
||||||
_complete_opts || _files
|
_complete_opts || _files
|
||||||
;;
|
;;
|
||||||
rdiff|patch|pa) # "+V:k:cuftsQqlRD:r:"
|
rdiff|patch|pa) # "+V:k:cuftsQqlRD:r:"
|
||||||
_complete_opts V: '' k: "$complete_k" c '' u '' f '' t '' s '' Q '' q '' l '' R '' D: "$complete_D" r: "$complete_r" || _files
|
_complete_opts V: '' k: "$complete_k" c '' u '' f '' t '' s '' Q '' \
|
||||||
|
q '' l '' R '' D: "$complete_D" r: "$complete_r" ||
|
||||||
|
_cvstargets
|
||||||
;;
|
;;
|
||||||
release|re|rel) # "+Qdq"
|
release|re|rel) # "+Qdq"
|
||||||
_complete_opts Q '' d '' q '' || _files -/
|
_complete_opts Q '' d '' q '' || _files -/
|
||||||
;;
|
;;
|
||||||
remove|rm|delete) # "+flR"
|
remove|rm|delete) # "+flR"
|
||||||
_complete_opts f '' l '' R '' || _files
|
_complete_opts f '' l '' R '' || _cvsremovep
|
||||||
;;
|
;;
|
||||||
status|st|stat) # "+vlR"
|
status|st|stat) # "+vlR"
|
||||||
_complete_opts v '' l '' R '' || _files
|
_complete_opts v '' l '' R '' || _cvstargets
|
||||||
;;
|
;;
|
||||||
tag|ta|freeze) # "+FQqlRcdr:D:bf"
|
tag|ta|freeze) # "+FQqlRcdr:D:bf"
|
||||||
_complete_opts F '' Q '' q '' l '' R '' c '' d '' r: "$complete_r" D: "$complete_D" b '' f '' || _files
|
_complete_opts F '' Q '' q '' l '' R '' c '' d '' r: "$complete_r" \
|
||||||
|
D: "$complete_D" b '' f '' ||
|
||||||
|
_cvstargets
|
||||||
;;
|
;;
|
||||||
unedit) # "+lR"
|
unedit) # "+lR"
|
||||||
_complete_opts l '' R '' || _files
|
_complete_opts l '' R '' || _cvstargets
|
||||||
;;
|
;;
|
||||||
update|up|upd) # "+ApPflRQqduk:r:D:j:I:W:"
|
update|up|upd) # "+ApPflRQqduk:r:D:j:I:W:"
|
||||||
_complete_opts A '' p '' P '' f '' l '' R '' Q '' q '' d '' u '' k: "$complete_k" r: "$complete_r" D: "$complete_D" j: '' I: '' W: '' || _files
|
_complete_opts A '' p '' P '' f '' l '' R '' Q '' q '' d '' u '' \
|
||||||
|
k: "$complete_k" r: "$complete_r" D: "$complete_D" j: "$complete_r" \
|
||||||
|
I: '' W: '' ||
|
||||||
|
_cvstargets
|
||||||
;;
|
;;
|
||||||
watch)
|
watch)
|
||||||
if (( CURRENT == com + 1 )); then
|
if (( CURRENT == com + 1 )); then
|
||||||
|
@ -101,41 +124,210 @@ if (( com < CURRENT )); then
|
||||||
else
|
else
|
||||||
case "$words[com+1]" in
|
case "$words[com+1]" in
|
||||||
on|off) # "+lR"
|
on|off) # "+lR"
|
||||||
_complete_opts l '' R '' || _files
|
_complete_opts l '' R '' || _cvstargets
|
||||||
;;
|
;;
|
||||||
add|remove) # "+lRa:"
|
add|remove) # "+lRa:"
|
||||||
_complete_opts l '' R '' a: '' || _files
|
_complete_opts l '' R '' \
|
||||||
|
a: 'compadd edit unedit commit all none' || \
|
||||||
|
_cvstargets
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
watchers) # "+lR"
|
watchers) # "+lR"
|
||||||
_complete_opts l '' R '' || _files
|
_complete_opts l '' R '' || _cvstargets
|
||||||
;;
|
;;
|
||||||
*) _files;;
|
*) _files;;
|
||||||
esac
|
esac
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case ${+cvs_roots} in
|
|
||||||
0)
|
|
||||||
cvs_roots=()
|
|
||||||
if [[ -f ~/.cvspass ]]; then
|
|
||||||
cvs_roots=(
|
|
||||||
$(cut -d ' ' -f 1 ~/.cvspass)
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
_complete_opts \
|
_complete_opts \
|
||||||
H '' Q '' q '' r '' w '' l '' n '' t '' v '' f '' a '' \
|
H '' Q '' q '' r '' w '' l '' n '' t '' v '' f '' a '' \
|
||||||
b: "compadd /usr/local/bin" \
|
b: "compadd /usr/local/bin" \
|
||||||
T: "compadd $TMPPREFIX:h $TMPDIR /tmp" \
|
T: "compadd $TMPPREFIX:h $TMPDIR /tmp" \
|
||||||
e: "compadd vi" \
|
e: "compadd vi" \
|
||||||
d: "compadd $cvs_roots || _files -/" \
|
d: "compadd $_cvs_roots || _files -/" \
|
||||||
z: "compadd 9'" \
|
z: "compadd 9'" \
|
||||||
s: "_cvs_user_variable" \
|
s: "_cvs_user_variable" \
|
||||||
||
|
||
|
||||||
compadd ${(k)commands} ||
|
compadd ${(k)commands} ||
|
||||||
compadd ${(kv)=commands}
|
compadd ${(kv)=commands}
|
||||||
|
}
|
||||||
|
|
||||||
|
_cvsrevisions () {
|
||||||
|
compadd - ${${${(M)${(f)"$(cvs -q status -vl .)"}:# *}##[ ]##}%%[ ]*}
|
||||||
|
}
|
||||||
|
|
||||||
|
_cvsrepositories () {
|
||||||
|
local root=$CVSROOT
|
||||||
|
[[ -f CVS/Root ]] && root=$(<CVS/Root)
|
||||||
|
|
||||||
|
if [[ $root = :* || ! -d $root ]]; then
|
||||||
|
compadd -UX "Enter repository name" -n '' &&
|
||||||
|
{ compstate[list]=list; compstate[force_list]=yes; compstate[insert]='' }
|
||||||
|
else
|
||||||
|
compadd - \
|
||||||
|
$root/^CVSROOT(:t) \
|
||||||
|
${${(M)${(f)"$(<$root/CVSROOT/modules)"}:#[^#]*}%%[ ]*}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_cvsprefix () {
|
||||||
|
#if [[ -prefix */ ]]; then
|
||||||
|
if [[ x"$PREFIX" == x*/* ]]; then
|
||||||
|
qpref="${PREFIX%/*}/"
|
||||||
|
pref=$~qpref
|
||||||
|
else
|
||||||
|
qpref=
|
||||||
|
pref=./
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_cvsdirentries () {
|
||||||
|
setopt localoptions nullglob unset
|
||||||
|
if [[ -f ${pref}CVS/Entries ]]; then
|
||||||
|
entries=(${${${(M)${(f)"$(<${pref}CVS/Entries)"}:#D/*}#D/}%%/*})
|
||||||
|
else
|
||||||
|
entries=()
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_cvsentries () {
|
||||||
|
setopt localoptions nullglob unset
|
||||||
|
if [[ -f ${pref}CVS/Entries ]]; then
|
||||||
|
entries=(${${${${(f)"$(<${pref}CVS/Entries)"}:#D}#(D|)/}%%/*})
|
||||||
|
else
|
||||||
|
entries=()
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_cvsentries_modified () {
|
||||||
|
if (( $+_cvsentries_modified_disable_stat )) ||
|
||||||
|
! { zmodload -e stat || zmodload stat }; then
|
||||||
|
_cvsentries
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
entries=()
|
||||||
|
local line Entries
|
||||||
|
typeset -A mtime
|
||||||
|
|
||||||
|
if [[ -f "${pref}CVS/Entries" ]]; then
|
||||||
|
Entries="$(<${pref}CVS/Entries)"
|
||||||
|
else
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
local LANG=C
|
||||||
|
local OLDTZ="$TZ"; if ! (( $+TZ )); then unset OLDTZ; fi; export TZ=GMT
|
||||||
|
|
||||||
|
mtime=(${(s:/:)${(j:/:)${${${${(M)${(f)Entries}:#/*}#/}%/*/*}/\\/*\\///}}})
|
||||||
|
entries=(${${${(M)${(f)Entries}:#D/*}#D/}%%/*})
|
||||||
|
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%% *}")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if (( $+OLDTZ )); then TZ="$OLDTZ"; else unset TZ; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_cvsdirs () {
|
||||||
|
if [[ -d ${pref}CVS ]]; then
|
||||||
|
_cvsdirentries
|
||||||
|
case $#entries in
|
||||||
|
0) false;;
|
||||||
|
1) compgen "$@" -g "${entries:q}";;
|
||||||
|
*) compgen "$@" -g '('${(j:|:)entries:q}')';;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
_files
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_cvstargets () {
|
||||||
|
local qpref pref entries
|
||||||
|
_cvsprefix
|
||||||
|
if [[ -d ${pref}CVS ]]; then
|
||||||
|
_cvsentries
|
||||||
|
case $#entries in
|
||||||
|
0) false;;
|
||||||
|
1) compgen -g "${entries:q}";;
|
||||||
|
*) compgen -g '('${(j:|:)entries:q}')';;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
_files
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_cvstargets_modified () {
|
||||||
|
local qpref pref entries
|
||||||
|
_cvsprefix
|
||||||
|
if [[ -d ${pref}CVS ]]; then
|
||||||
|
_cvsentries_modified
|
||||||
|
case $#entries in
|
||||||
|
0) false;;
|
||||||
|
1) compgen -g "${entries:q}";;
|
||||||
|
*) compgen -g '('${(j:|:)entries:q}')';;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
_files
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_cvsremovep () {
|
||||||
|
local qpref pref entries
|
||||||
|
_cvsprefix
|
||||||
|
if [[ -d ${pref}CVS ]]; then
|
||||||
|
_cvsentries
|
||||||
|
setopt localoptions unset
|
||||||
|
local omit
|
||||||
|
omit=(${pref}*(D:t))
|
||||||
|
eval 'entries=(${entries:#('${(j:|:)omit:q}')})'
|
||||||
|
compadd -P "$qpref" - ${entries:q} ||
|
||||||
|
_cvsdirs
|
||||||
|
else
|
||||||
|
_files
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_cvsaddp () {
|
||||||
|
local qpref pref entries
|
||||||
|
_cvsprefix
|
||||||
|
if [[ -d ${pref}CVS ]]; then
|
||||||
|
_cvsentries
|
||||||
|
setopt localoptions unset
|
||||||
|
local omit
|
||||||
|
omit=($_cvs_ignore_default ${entries:q} ${=cvsignore})
|
||||||
|
[[ -r ~/.cvsignore ]] && omit=($omit $(<~/.cvsignore))
|
||||||
|
[[ -r ${pref}.cvsignore ]] && omit=($omit $(<${pref}.cvsignore))
|
||||||
|
compgen -g '*~(*/|)('${(j:|:)omit}')(D)' ||
|
||||||
|
compgen -g '*~(*/|)('${(j:|:)entries:q}')(D)' ||
|
||||||
|
_cvsdirs
|
||||||
|
else
|
||||||
|
_files
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if (( ! $+_cvs_ignore_default )); then
|
||||||
|
_cvs_ignore_default=(
|
||||||
|
RCS SCCS CVS CVS.adm RCSLOG 'cvslog.*' tags TAGS .make.state .nse_depinfo
|
||||||
|
'*\~' '\#*' '.\#*' ',*' '_$*' '*$' '*.old' '*.bak' '*.BAK' '*.orig' '*.rej'
|
||||||
|
'.del-*' '*.a' '*.olb' '*.o' '*.obj' '*.so' '*.exe' '*.Z' '*.elc' '*.ln'
|
||||||
|
core
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( ! $+_cvs_roots )); then
|
||||||
|
if [[ -f ~/.cvspass ]]; then
|
||||||
|
_cvs_roots=(${${(f)"$(<~/.cvspass)"}%% *})
|
||||||
|
else
|
||||||
|
_cvs_roots=()
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
_cvs "$@"
|
||||||
|
|
|
@ -27,5 +27,5 @@
|
||||||
# This must also serve as a shell script, so do not add spaces around the
|
# This must also serve as a shell script, so do not add spaces around the
|
||||||
# `=' signs.
|
# `=' signs.
|
||||||
|
|
||||||
VERSION=3.1.6-test-3
|
VERSION=3.1.6
|
||||||
VERSION_DATE='July 24, 1999'
|
VERSION_DATE='July 30, 1999'
|
||||||
|
|
|
@ -13,6 +13,6 @@ DISTFILES_SRC='
|
||||||
|
|
||||||
DISTFILES_DOC='
|
DISTFILES_DOC='
|
||||||
zsh.info zsh.info-[0-9]*
|
zsh.info zsh.info-[0-9]*
|
||||||
zsh_toc.html zsh_[0-9]*.html
|
zsh_*toc.html zsh_[0-9]*.html
|
||||||
zsh.dvi zsh_us.ps zsh_a4.ps
|
zsh.dvi zsh_us.ps zsh_a4.ps
|
||||||
'
|
'
|
||||||
|
|
|
@ -6,12 +6,22 @@ cindex(completion, controlling)
|
||||||
sect(Description)
|
sect(Description)
|
||||||
|
|
||||||
This describes the shell code for the new completion system. It consists
|
This describes the shell code for the new completion system. It consists
|
||||||
of varsious shell functions; those beginning `tt(comp)' are to be called
|
of various shell functions; those beginning `tt(comp)' are to be called
|
||||||
directly by the user, while those beginning `tt(_)' are called by the
|
directly by the user, while those beginning `tt(_)' are called by the
|
||||||
completion code. The shell functions of the second set which implement
|
completion code. The shell functions of the second set which implement
|
||||||
completion behaviour and which may be bound to keystrokes, are referred to
|
completion behaviour and which may be bound to keystrokes, are referred to
|
||||||
as `widgets'.
|
as `widgets'.
|
||||||
|
|
||||||
|
Note that with the function-based completions described here, it
|
||||||
|
is also possible to use the `tt(compctl -M ...)' mechanism to specify
|
||||||
|
global matching control, such as case-insensitivity (`tt(abc)' will complete
|
||||||
|
to a string beginning `tt(ABC)'), or wildcard behaviour on
|
||||||
|
certain anchors (`tt(a-d)' will complete to abc-def as if there were a
|
||||||
|
`tt(*)' after the `a'). See
|
||||||
|
ifzman(the section `Matching Control' in zmanref(zshcompctl))\
|
||||||
|
ifnzman(noderef(Matching Control))
|
||||||
|
for further details.
|
||||||
|
|
||||||
startmenu()
|
startmenu()
|
||||||
menu(Initialization)
|
menu(Initialization)
|
||||||
menu(Control Functions)
|
menu(Control Functions)
|
||||||
|
@ -728,14 +738,28 @@ These functions also accept the `tt(-J)', `tt(-V)', `tt(-X)', `tt(-P)',
|
||||||
`tt(-S)', `tt(-q)', `tt(-r)', and `tt(-R)' options from the
|
`tt(-S)', `tt(-q)', `tt(-r)', and `tt(-R)' options from the
|
||||||
tt(compadd) builtin.
|
tt(compadd) builtin.
|
||||||
|
|
||||||
Finally, the tt(_path_files) function supports two configuration keys.
|
Finally, the tt(_path_files) function supports three configuration keys.
|
||||||
If tt(path_expand) is set to any non-empty string, the partially
|
startitem()
|
||||||
|
item(tt(path_expand))(
|
||||||
|
If this is set to any non-empty string, the partially
|
||||||
typed path from the line will be expanded as far as possible even if
|
typed path from the line will be expanded as far as possible even if
|
||||||
trailing pathname components can not be completed. And if
|
trailing pathname components can not be completed.
|
||||||
tt(path_cursor) is set to a non-empty string, the cursor will be left
|
)
|
||||||
|
item(tt(path_cursor))(
|
||||||
|
If this is set to a non-empty string, the cursor will be left
|
||||||
after the first ambiguous pathname component even when menucompletion
|
after the first ambiguous pathname component even when menucompletion
|
||||||
is used.
|
is used.
|
||||||
)
|
)
|
||||||
|
item(tt(path_keepdir))(
|
||||||
|
If this is set to a non-empty string, then if completion immediately after
|
||||||
|
a slash fails, treat the original string as a successful completion. This
|
||||||
|
prevents a valid directory being treated as a candidate for correction.
|
||||||
|
However, it has the side effect that a pattern completion, such as
|
||||||
|
`tt(files -g *(*))', will no longer try to complete directories in this
|
||||||
|
position if there are no file matches.
|
||||||
|
)
|
||||||
|
enditem()
|
||||||
|
)
|
||||||
item(tt(_parameters))(
|
item(tt(_parameters))(
|
||||||
This should be used to complete parameter names if you need some of the
|
This should be used to complete parameter names if you need some of the
|
||||||
extra options of tt(compadd). All arguments are passed unchanged to
|
extra options of tt(compadd). All arguments are passed unchanged to
|
||||||
|
@ -804,7 +828,7 @@ with two hyphens. The option `tt(-i) var(patterns)' can be used to
|
||||||
give patterns for options which should not be completed. The patterns
|
give patterns for options which should not be completed. The patterns
|
||||||
can be given as the name of an array parameter or as a literal list in
|
can be given as the name of an array parameter or as a literal list in
|
||||||
parentheses. E.g. `tt(-i "(--(en|dis)able-FEATURE*)")' will ignore the
|
parentheses. E.g. `tt(-i "(--(en|dis)able-FEATURE*)")' will ignore the
|
||||||
options `tt(--enable-FEATURE)' and `tt(--diable-FEATURE)'. Finally,
|
options `tt(--enable-FEATURE)' and `tt(--disable-FEATURE)'. Finally,
|
||||||
the option `tt(-s) var(pairs)' can be used to describe options
|
the option `tt(-s) var(pairs)' can be used to describe options
|
||||||
aliases. Each var(pair) consists of a pattern and a
|
aliases. Each var(pair) consists of a pattern and a
|
||||||
replacement. E.g. some tt(configure)-scripts describe options only as
|
replacement. E.g. some tt(configure)-scripts describe options only as
|
||||||
|
@ -829,7 +853,7 @@ standard directory where it appears.
|
||||||
startitem()
|
startitem()
|
||||||
item(tt(Core))(
|
item(tt(Core))(
|
||||||
The core scripts and functions. You will certainly need these, though will
|
The core scripts and functions. You will certainly need these, though will
|
||||||
probably not need to alter them. Many of these are docmented above.
|
probably not need to alter them. Many of these are documented above.
|
||||||
)
|
)
|
||||||
item(tt(Base))(
|
item(tt(Base))(
|
||||||
Other functions you will almost certainly want if you are going to use
|
Other functions you will almost certainly want if you are going to use
|
||||||
|
@ -862,8 +886,8 @@ startitem()
|
||||||
item(tt(_correct_filename (^XC)))(
|
item(tt(_correct_filename (^XC)))(
|
||||||
Correct the filename path at the cursor position. Allows up to six errors
|
Correct the filename path at the cursor position. Allows up to six errors
|
||||||
in the name. Can also be called with an argument to correct
|
in the name. Can also be called with an argument to correct
|
||||||
a filepath, independently of zle; the correction is printed on standard
|
a filename path, independently of zle; the correction is printed on
|
||||||
output.
|
standard output.
|
||||||
)
|
)
|
||||||
item(tt(_correct_word) (^Xc))(
|
item(tt(_correct_word) (^Xc))(
|
||||||
Performs correction of the current argument using the usual contextual
|
Performs correction of the current argument using the usual contextual
|
||||||
|
|
|
@ -18,11 +18,12 @@ the code should generally go to the mailing list.
|
||||||
texinode(Availability)(Mailing Lists)(Author)(Introduction)
|
texinode(Availability)(Mailing Lists)(Author)(Introduction)
|
||||||
sect(Availability)
|
sect(Availability)
|
||||||
Zsh is available from the following anonymous FTP sites. These mirror
|
Zsh is available from the following anonymous FTP sites. These mirror
|
||||||
sites are kept frequently up to date. The sites marked with em((G))
|
sites are kept frequently up to date. The sites marked with em((H)) may be
|
||||||
may be mirroring tt(ftp.math.gatech.edu) instead of the primary site.
|
mirroring tt(ftp.cs.elte.hu) instead of the primary site.
|
||||||
The sites marked with em((H)) may be mirroring tt(ftp.cs.elte.hu)
|
|
||||||
instead of the primary site.
|
|
||||||
|
|
||||||
|
cindex(FTP sites for zsh)
|
||||||
|
cindex(acquiring zsh by FTP)
|
||||||
|
cindex(availability of zsh)
|
||||||
startitem()
|
startitem()
|
||||||
item(Primary site)(
|
item(Primary site)(
|
||||||
nofill(tt(ftp://ftp.zsh.org/pub/zsh/)
|
nofill(tt(ftp://ftp.zsh.org/pub/zsh/)
|
||||||
|
@ -31,7 +32,7 @@ tt(http://www.zsh.org/pub/zsh/))
|
||||||
item(Australia)(
|
item(Australia)(
|
||||||
nofill(tt(ftp://ftp.zsh.org/pub/zsh/)
|
nofill(tt(ftp://ftp.zsh.org/pub/zsh/)
|
||||||
tt(http://www.zsh.org/pub/zsh/)
|
tt(http://www.zsh.org/pub/zsh/)
|
||||||
tt(ftp://ftp.ips.gov.au/pub/packages/zsh/) em((G)) em((H)))
|
tt(ftp://ftp.ips.gov.au/pub/packages/zsh/) em((H)))
|
||||||
)
|
)
|
||||||
item(Denmark)(
|
item(Denmark)(
|
||||||
nofill(tt(ftp://sunsite.auc.dk/pub/unix/shells/zsh/))
|
nofill(tt(ftp://sunsite.auc.dk/pub/unix/shells/zsh/))
|
||||||
|
@ -56,19 +57,24 @@ item(Israel)(
|
||||||
nofill(tt(ftp://ftp.math.technion.ac.il/mirror/ftp.zsh.org/pub/zsh/)
|
nofill(tt(ftp://ftp.math.technion.ac.il/mirror/ftp.zsh.org/pub/zsh/)
|
||||||
tt(http://www.math.technion.ac.il/mirror/ftp.zsh.org/pub/zsh/))
|
tt(http://www.math.technion.ac.il/mirror/ftp.zsh.org/pub/zsh/))
|
||||||
)
|
)
|
||||||
|
item(Italy)(
|
||||||
|
nofill(tt(ftp://ftp.unina.it/pub/Unix/pkgs/shell/zsh/))
|
||||||
|
)
|
||||||
item(Japan)(
|
item(Japan)(
|
||||||
nofill(tt(ftp://ftp.tohoku.ac.jp/mirror/zsh/) em((H))
|
nofill(tt(ftp://ftp.nisiq.net/pub/shells/zsh/) em((H))
|
||||||
tt(ftp://ftp.nisiq.net/pub/shells/zsh/) em((H))
|
|
||||||
tt(ftp://ftp.win.ne.jp/pub/shell/zsh/))
|
tt(ftp://ftp.win.ne.jp/pub/shell/zsh/))
|
||||||
)
|
)
|
||||||
item(Norway)(
|
item(Norway)(
|
||||||
nofill(tt(ftp://ftp.uit.no/pub/unix/shells/zsh/))
|
nofill(tt(ftp://ftp.uit.no/pub/unix/shells/zsh/))
|
||||||
)
|
)
|
||||||
|
item(Poland)(
|
||||||
|
nofill(tt(ftp://sunsite.icm.edu.pl/pub/unix/shells/zsh/))
|
||||||
|
)
|
||||||
item(Romania)(
|
item(Romania)(
|
||||||
nofill(tt(ftp://ftp.roedu.net/pub/mirrors/ftp.zsh.org/pub/zsh/))
|
nofill(tt(ftp://ftp.roedu.net/pub/mirrors/ftp.zsh.org/pub/zsh/))
|
||||||
)
|
)
|
||||||
item(Slovenia)(
|
item(Slovenia)(
|
||||||
nofill(tt(ftp://ftp.siol.net/pub/unix/shells/zsh/) em((H)))
|
nofill(tt(ftp://ftp.siol.net/mirrors/zsh/))
|
||||||
)
|
)
|
||||||
item(Sweden)(
|
item(Sweden)(
|
||||||
nofill(tt(ftp://ftp.lysator.liu.se/pub/unix/zsh/))
|
nofill(tt(ftp://ftp.lysator.liu.se/pub/unix/zsh/))
|
||||||
|
@ -78,8 +84,7 @@ nofill(tt(ftp://ftp.net.lut.ac.uk/zsh/)
|
||||||
tt(ftp://sunsite.org.uk/packages/zsh/))
|
tt(ftp://sunsite.org.uk/packages/zsh/))
|
||||||
)
|
)
|
||||||
item(USA)(
|
item(USA)(
|
||||||
nofill(tt(ftp://ftp.math.gatech.edu/pub/zsh/)
|
nofill(tt(ftp://uiarchive.uiuc.edu/pub/packages/shells/zsh/)
|
||||||
tt(ftp://uiarchive.uiuc.edu/pub/packages/shells/zsh/)
|
|
||||||
tt(ftp://ftp.rge.com/pub/shells/zsh/)
|
tt(ftp://ftp.rge.com/pub/shells/zsh/)
|
||||||
tt(ftp://foad.org/pub/zsh/)
|
tt(ftp://foad.org/pub/zsh/)
|
||||||
tt(http://foad.org/zsh/))
|
tt(http://foad.org/zsh/))
|
||||||
|
|
|
@ -63,7 +63,7 @@ cindex(subscripts)
|
||||||
pindex(KSH_ARRAYS, use of)
|
pindex(KSH_ARRAYS, use of)
|
||||||
|
|
||||||
The same subscripting syntax is used for associative arrays,
|
The same subscripting syntax is used for associative arrays,
|
||||||
except that no arithmetic expansion is applied to var(EXP).
|
except that no arithmetic expansion is applied to var(exp).
|
||||||
|
|
||||||
A subscript of the form `tt([*])' or `tt([@])' evaluates to all
|
A subscript of the form `tt([*])' or `tt([@])' evaluates to all
|
||||||
elements of an array; there is no difference between the two
|
elements of an array; there is no difference between the two
|
||||||
|
|
|
@ -99,6 +99,14 @@ Normally, the var(host), var(user) and var(password) are internally
|
||||||
recorded for later re-opening, either by a tt(zfopen) with no arguments, or
|
recorded for later re-opening, either by a tt(zfopen) with no arguments, or
|
||||||
automatically (see below). With the option `tt(-1)', no information is
|
automatically (see below). With the option `tt(-1)', no information is
|
||||||
stored.
|
stored.
|
||||||
|
|
||||||
|
Both tt(zfopen) and tt(zfanon) (but not tt(zfparams)) understand URLs of
|
||||||
|
the form tt(ftp://)var(host)/var(path...) as meaning to connect to the
|
||||||
|
var(host), then change directory to var(path) (which must be a directory,
|
||||||
|
not a file). The `tt(ftp://)' can be omitted; the trailing `tt(/)' is enough
|
||||||
|
to trigger recognition of the var(path). Note prefixes other than
|
||||||
|
`tt(ftp:)' are not recognized, and that all characters after the first
|
||||||
|
slash beyond tt(host) are significant in var(path).
|
||||||
)
|
)
|
||||||
findex(zfanon)
|
findex(zfanon)
|
||||||
item(tt(zfanon [ -1 ] var(host)))(
|
item(tt(zfanon [ -1 ] var(host)))(
|
||||||
|
@ -204,11 +212,13 @@ tt(zfrtime) below for more information.
|
||||||
|
|
||||||
startitem()
|
startitem()
|
||||||
findex(zfget)
|
findex(zfget)
|
||||||
item(tt(zfget [ -Gt ] var(file1) ...))(
|
item(tt(zfget [ -Gtc ] var(file1) ...))(
|
||||||
Retrieve all the listed files var(file1) ... one at a time from the remote
|
Retrieve all the listed files var(file1) ... one at a time from the remote
|
||||||
server. If a file contains a `tt(/)', the full name is passed to the
|
server. If a file contains a `tt(/)', the full name is passed to the
|
||||||
remote server, but the file is stored locally under the name given by the
|
remote server, but the file is stored locally under the name given by the
|
||||||
part after the final `tt(/)'.
|
part after the final `tt(/)'. The option tt(-c) (cat) forces all files to
|
||||||
|
be sent as a single stream to standard output; in this case the tt(-t)
|
||||||
|
option has no effect.
|
||||||
)
|
)
|
||||||
findex(zfuget)
|
findex(zfuget)
|
||||||
item(tt(zfuget [ -Gvst ] var(file1) ...))(
|
item(tt(zfuget [ -Gvst ] var(file1) ...))(
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
.nr PI 0
|
.nr PI 0
|
||||||
.nr LL 6.5i
|
.nr LL 6.5i
|
||||||
|
.if \n(.g \{\
|
||||||
|
.if "\*(.T"ascii" .ftr C R
|
||||||
|
.if "\*(.T"latin1" .ftr C R
|
||||||
|
.nr De \n[.ss]
|
||||||
|
.\}
|
||||||
.de Ds
|
.de Ds
|
||||||
.DS I .5i
|
.DS I .5i
|
||||||
.ft C
|
.ft C
|
||||||
|
@ -12,7 +17,8 @@
|
||||||
.ft R
|
.ft R
|
||||||
.ps
|
.ps
|
||||||
.vs
|
.vs
|
||||||
.ss
|
.ie \n(.g .ss \n(De
|
||||||
|
.el .ss
|
||||||
..
|
..
|
||||||
.de Sh
|
.de Sh
|
||||||
.SH
|
.SH
|
||||||
|
|
15
Etc/BUGS
15
Etc/BUGS
|
@ -44,3 +44,18 @@ and ksh and may be removed in the future. A good fix would be to keep
|
||||||
such patterns unchanged if they do not match regardless of the state of
|
such patterns unchanged if they do not match regardless of the state of
|
||||||
the nonomatch and nullglob options.
|
the nonomatch and nullglob options.
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
Numeric ranges are still too greedy with using characters; for example,
|
||||||
|
<1-1000>33 will not match 633 because the 633 matches the range. Some
|
||||||
|
backtracking will be necessary.
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
Matching control can leave the wrong thing in the line. For example,
|
||||||
|
touch Abc-Def-Ghij.txt
|
||||||
|
touch Abc-def.ghi.jkl_mno.pqr.txt
|
||||||
|
touch Abc_def_ghi_jkl_mno_pqr.txt
|
||||||
|
compctl -M 'm:{a-z}={A-Z} r:|[.,_-]=*'
|
||||||
|
ls a<TAB>
|
||||||
|
produces
|
||||||
|
ls Abcdefghi
|
||||||
|
which won't complete further. It seems to get confused over the choice of
|
||||||
|
possible punctuation characters, and the string won't complete further.
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
|
@ -25,20 +25,20 @@ Version 3.1.6
|
||||||
additional autoloading code; general code changes for extra efficiency;
|
additional autoloading code; general code changes for extra efficiency;
|
||||||
subscripting and ordering of globbing lists.
|
subscripting and ordering of globbing lists.
|
||||||
|
|
||||||
* Peter Stephenson <pws@ibmth.df.unipi.it>: zftp and mapfile modules and
|
* Peter Stephenson <pws@zsh.org>: zftp and mapfile modules and zf*
|
||||||
zf* functions; local parameters and typeset changes; changes in autoconf
|
functions; local parameters and typeset changes; changes in autoconf
|
||||||
system; case-independent and approximate pattern matching; various
|
system; case-independent and approximate pattern matching; various
|
||||||
options; a few completion modules; some zle changes; FAQ.
|
options; a few completion modules; some zle changes; FAQ.
|
||||||
|
|
||||||
* Bart Schaefer <schaefer@candle.brasslantern.com>: associative array
|
* Bart Schaefer <schaefer@zsh.org>: associative array implementation; other
|
||||||
implementation; other parameter changes; keeping track of missing
|
parameter changes; keeping track of missing patches; function autoloading
|
||||||
patches; function autoloading changes.
|
changes.
|
||||||
|
|
||||||
* Wayne Davison <wayne@clari.net>: History code novelties and improvements
|
* Wayne Davison <wayne@clari.net>: History code novelties and improvements
|
||||||
with new options.
|
with new options.
|
||||||
|
|
||||||
* Geoff Wing <mason@primenet.com.au>: Zle display code fixes, mailing
|
* Geoff Wing <gcw@zsh.org>: Zle display code fixes, mailing list and patch
|
||||||
list and patch archive.
|
archive.
|
||||||
|
|
||||||
* Zoltán Hidvégi <hzoli@cs.elte.hu>: AIX dynamic loading code.
|
* Zoltán Hidvégi <hzoli@cs.elte.hu>: AIX dynamic loading code.
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ Other improvements, bug fixes and design suggestions from all the above
|
||||||
plus Andrej Borsenkow, Oliver Kiddle, Tanaka Akira, Naoki Wakamatsu, Tatuso
|
plus Andrej Borsenkow, Oliver Kiddle, Tanaka Akira, Naoki Wakamatsu, Tatuso
|
||||||
Furukawa, Ville Herva, Will Day, Lehti Rahmi, Larry P. Schrof, Helmut
|
Furukawa, Ville Herva, Will Day, Lehti Rahmi, Larry P. Schrof, Helmut
|
||||||
Jarausch, Phil Pennock, Wilfredo Sanchez, Bruce Stephens, Gene Cohler,
|
Jarausch, Phil Pennock, Wilfredo Sanchez, Bruce Stephens, Gene Cohler,
|
||||||
Ollivier Robert.
|
Ollivier Robert, Felix Rosencrantz.
|
||||||
|
|
||||||
Previous versions of zsh 3 were maintained by Zoltán Hidvégi and Andrew
|
Previous versions of zsh 3 were maintained by Zoltán Hidvégi and Andrew
|
||||||
Main (Zefram).
|
Main (Zefram).
|
||||||
|
@ -69,13 +69,13 @@ Version 3.0
|
||||||
8-bit clean. Made some reorganizations in exec.c. Fixed signal
|
8-bit clean. Made some reorganizations in exec.c. Fixed signal
|
||||||
handling bugs. Fixed lots of bugs in various places.
|
handling bugs. Fixed lots of bugs in various places.
|
||||||
|
|
||||||
* Peter W. Stephenson <pws@ifh.de> the maintainer of the zsh FAQ.
|
* Peter W. Stephenson <pws@zsh.org> the maintainer of the zsh FAQ.
|
||||||
Reorganizations in exec.c. Rewrote and reorganized the history code.
|
Reorganizations in exec.c. Rewrote and reorganized the history code.
|
||||||
Rewrote the zshcompctl manual page. Fixed several bugs related to
|
Rewrote the zshcompctl manual page. Fixed several bugs related to
|
||||||
programmable completion. Fixed several signal handling bugs. Rewrote
|
programmable completion. Fixed several signal handling bugs. Rewrote
|
||||||
test and read builtins. Lots of other bugfixes.
|
test and read builtins. Lots of other bugfixes.
|
||||||
|
|
||||||
* Andrew Main (Zefram) <zefram@fysh.org> reorganized builtin.c.
|
* Andrew Main (Zefram) <zefram@zsh.org> reorganized builtin.c.
|
||||||
Rewrote large parts of the zle vi mode. Redirection fixes. Reorganized
|
Rewrote large parts of the zle vi mode. Redirection fixes. Reorganized
|
||||||
parts of the completion code, added some enhancements and fixed lots of
|
parts of the completion code, added some enhancements and fixed lots of
|
||||||
bugs. Made zle fully 8-bit clean. Fixed several zle bugs. Reorganized
|
bugs. Made zle fully 8-bit clean. Fixed several zle bugs. Reorganized
|
||||||
|
@ -85,21 +85,21 @@ Version 3.0
|
||||||
programmable completion code in zsh-2.5.0. Several bugfixes in exec.c
|
programmable completion code in zsh-2.5.0. Several bugfixes in exec.c
|
||||||
and jobs.c. Lots of completion bugfixes and enhancements.
|
and jobs.c. Lots of completion bugfixes and enhancements.
|
||||||
|
|
||||||
* Geoff Wing <mason@werple.net.au> rewrote most of zle_refresh.c. Some
|
* Geoff Wing <gcw@zsh.org> rewrote most of zle_refresh.c. Some
|
||||||
other bugfixes.
|
other bugfixes.
|
||||||
|
|
||||||
* Clive Messer <clive@epos.demon.co.uk> brought the texinfo documentation
|
* Clive Messer <clive@epos.demon.co.uk> brought the texinfo documentation
|
||||||
up-to-date.
|
up-to-date.
|
||||||
|
|
||||||
* Mark Borges <mdb@cdc.noaa.gov> maintains the zsh web page
|
* Mark Borges <mdb@cdc.noaa.gov> contributed several documentation fixes
|
||||||
(http://www.mal.com/zsh/). Several documentation fixes. Maintains the
|
including further texinfo documentation updates and maintained the zsh
|
||||||
texinfo documentation together with Clive.
|
web pages during their tenure at www.mal.com.
|
||||||
|
|
||||||
* Wayne Davison <wayne@clari.net> improved the the zle search functions
|
* Wayne Davison <wayne@clari.net> improved the the zle search functions
|
||||||
and made them 8-bit clean. Some other little bugfixes.
|
and made them 8-bit clean. Some other little bugfixes.
|
||||||
|
|
||||||
* Bart Schaefer <schaefer@candle.brasslantern.com> submitted several
|
* Bart Schaefer <schaefer@zsh.org> submitted several bugfixes, reported
|
||||||
bugfixes, reported lots of bugs and gave many very useful suggestions.
|
lots of bugs and gave many very useful suggestions.
|
||||||
|
|
||||||
Version 2.5
|
Version 2.5
|
||||||
-----------
|
-----------
|
||||||
|
|
36
Etc/MACHINES
36
Etc/MACHINES
|
@ -56,9 +56,15 @@ HP: HP-UX 9, 10.20, 11.0
|
||||||
(rather than the 10.20 shl_load() function set). More details of
|
(rather than the 10.20 shl_load() function set). More details of
|
||||||
any difficulties would be appreciated.
|
any difficulties would be appreciated.
|
||||||
|
|
||||||
IBM: AIX
|
IBM: AIX 3.2, 4.1
|
||||||
Should build `out-of-the-box'. On AIX 3.x (at least),
|
Should build `out-of-the-box', but --enable-zsh-mem will not work.
|
||||||
--enable-zsh-mem will not work.
|
|
||||||
|
On 3.2, for 64-bit integer support you need to compile with gcc, as
|
||||||
|
the native compiler does not support ANSI simulataneously with
|
||||||
|
`long long'. On 4.1, there appear to be problems using
|
||||||
|
--enable-dynamic (the default) with gcc (version was 2.7.2.3) in
|
||||||
|
4.1, though native cc works. More information about this problem
|
||||||
|
would be appreciated.
|
||||||
|
|
||||||
Linux: Linux (i386) [3.1.4]
|
Linux: Linux (i386) [3.1.4]
|
||||||
Should build `out-of-the-box'.
|
Should build `out-of-the-box'.
|
||||||
|
@ -81,14 +87,24 @@ Next: NextStep 3.*
|
||||||
Should build `out-of-the-box', but the zsh malloc routines are
|
Should build `out-of-the-box', but the zsh malloc routines are
|
||||||
not recommended.
|
not recommended.
|
||||||
|
|
||||||
Reliant: Reliant UNIX
|
SIEMENS: Reliant UNIX
|
||||||
Should build `out-of-the-box'.
|
Builds `out-of-the-box'. Dynamic loading is supported.
|
||||||
|
Large Files and 64-bit integers are supported as of version 5.44
|
||||||
|
and CDS/CDS++ compiler.
|
||||||
|
|
||||||
Reliant: SINIX
|
SIEMENS: SINIX
|
||||||
Should build `out-of-the-box'. There is a bad combination of
|
MX (Intel) plattform: SINIX-L/M 5.41
|
||||||
static and shared libraries that prevents the use of dynamic
|
Builds out-of-the-box with EGCS. Neither dynamic loading nor
|
||||||
linking; configure now detects this and will disable dynamic
|
64-bit integers are suported. Native compiler was not tried
|
||||||
linking even if you requested it.
|
mostly because GCC/EGCS builds out-of-the-box as well. If you
|
||||||
|
succeed with native compiler, send a patch for this file
|
||||||
|
to zsh-workers.
|
||||||
|
|
||||||
|
RM (MIPS) plattform: SINIX-N/Y 5.42
|
||||||
|
Should build out-of-the-box but it was not tested. Neither
|
||||||
|
dynamic loading nor 64-bit integers are suported.
|
||||||
|
Note, that this version is obsolete and users are expected to
|
||||||
|
update to Reliant UNIX.
|
||||||
|
|
||||||
SGI: IRIX 5.1.1.1, 5.2, 5.3, 6.2, 6.3, 6.5
|
SGI: IRIX 5.1.1.1, 5.2, 5.3, 6.2, 6.3, 6.5
|
||||||
Should build `out-of-the-box'.
|
Should build `out-of-the-box'.
|
||||||
|
|
84
Etc/NEWS
84
Etc/NEWS
|
@ -4,6 +4,8 @@ CHANGES FROM PREVIOUS VERSIONS OF ZSH
|
||||||
|
|
||||||
New features in zsh version 3.1.6 (beta version)
|
New features in zsh version 3.1.6 (beta version)
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
|
Note also the changes for 3.0.6, which include changes between 3.1.5. and
|
||||||
|
3.1.6.
|
||||||
|
|
||||||
New completion system via shell functions; massive degree of
|
New completion system via shell functions; massive degree of
|
||||||
programmability and configurability:
|
programmability and configurability:
|
||||||
|
@ -27,7 +29,8 @@ Other editing changes:
|
||||||
History changes: new options HIST_NO_FUNCTIONS, HIST_EXPIRE_DUPS_FIRST,
|
History changes: new options HIST_NO_FUNCTIONS, HIST_EXPIRE_DUPS_FIRST,
|
||||||
HIST_FIND_NO_DUPS, HIST_IGNORE_ALL_DUPS, INC_APPEND_HISTORY,
|
HIST_FIND_NO_DUPS, HIST_IGNORE_ALL_DUPS, INC_APPEND_HISTORY,
|
||||||
HIST_SAVE_NO_DUPS, SHARE_HISTORY, allow better control of when history is
|
HIST_SAVE_NO_DUPS, SHARE_HISTORY, allow better control of when history is
|
||||||
read and written and how duplicates are handled.
|
read and written and how duplicates are handled. New format for history
|
||||||
|
saves.
|
||||||
|
|
||||||
Associative arrays plus enhanced parameter substitutions to retrieve keys
|
Associative arrays plus enhanced parameter substitutions to retrieve keys
|
||||||
and values.
|
and values.
|
||||||
|
@ -47,10 +50,9 @@ New loadable modules:
|
||||||
array interface.
|
array interface.
|
||||||
|
|
||||||
Debugging and prompt enhancements:
|
Debugging and prompt enhancements:
|
||||||
- LINENO is now very much more useful in scripts and functions and has
|
- $PS4 can contain %i for $LINENO as well as %N for script or function
|
||||||
corresponding prompt escape %i
|
names (default PS4 changed), also %_ for current shell structure
|
||||||
- $PS4 can contain %i as well as %N for script or function names
|
executing;
|
||||||
(default PS4 changed), also %_ for current shell structure executing;
|
|
||||||
- Prompt truncation %<...< is now more flexible: it applies to a
|
- Prompt truncation %<...< is now more flexible: it applies to a
|
||||||
whole section of the prompt, not just one escape. You need to put
|
whole section of the prompt, not just one escape. You need to put
|
||||||
%<< after the truncated escape to get the old behaviour.
|
%<< after the truncated escape to get the old behaviour.
|
||||||
|
@ -58,8 +60,8 @@ Debugging and prompt enhancements:
|
||||||
been output, else no (e.g. for outputting extra newlines).
|
been output, else no (e.g. for outputting extra newlines).
|
||||||
|
|
||||||
Parameter and expansion changes
|
Parameter and expansion changes
|
||||||
- typeset -t MYPATH mypath creates tied path/PATH-like variables
|
- `typeset -t MYPATH mypath' creates tied path/PATH-like variables
|
||||||
- typeset -g allows operations on parameters without making them local
|
- `typeset -g' allows operations on parameters without making them local
|
||||||
- New expansions
|
- New expansions
|
||||||
- ${(t)param} prints type information for $param
|
- ${(t)param} prints type information for $param
|
||||||
- ${(P)param} treats value of $param as the name of a param to
|
- ${(P)param} treats value of $param as the name of a param to
|
||||||
|
@ -68,27 +70,79 @@ Parameter and expansion changes
|
||||||
- ${foo/old/new} substitution, like bash; also (S) flag for shortest
|
- ${foo/old/new} substitution, like bash; also (S) flag for shortest
|
||||||
match
|
match
|
||||||
- $foo[(b.2.i)bar] starts searching $foo for bar starting at 2nd match
|
- $foo[(b.2.i)bar] starts searching $foo for bar starting at 2nd match
|
||||||
- more logical behaviour of nested parameters, now properly documented
|
|
||||||
- quote only nested expansion, e.g. ${(f)"$(<file)"} reads complete
|
|
||||||
`file', then splits lines into array.
|
|
||||||
|
|
||||||
Builtin and function changes
|
Builtin and function changes
|
||||||
- stat module: `stat -H hash foo' gives you e.g. $hash[mtime]
|
- stat module: `stat -H hash foo' gives you e.g. $hash[mtime]
|
||||||
- autoload -U autoloads functions without alias expansion.
|
- `autoload -U' autoloads functions without alias expansion.
|
||||||
|
|
||||||
Other new options:
|
Other new options:
|
||||||
- LOCAL_TRAPS allows signal traps to be local to functions (as in ksh).
|
- LOCAL_TRAPS allows signal traps to be local to functions (as in ksh).
|
||||||
- NO_RCS can now be turned on at any point in initialization files.
|
- NO_RCS can now be turned on at any point in initialization files.
|
||||||
- NO_GLOBAL_RCS can force /etc/z* files after /etc/zshenv to be skipped.
|
- NO_GLOBAL_RCS can force /etc/z* files after /etc/zshenv to be skipped.
|
||||||
(Please don't use this as an excuse to stuff more into /etc/zshenv!)
|
(Please don't use this as an excuse to stuff more into /etc/zshenv!)
|
||||||
- existing MAGIC_EQUAL_SUBST option is more useful; any argument containing
|
- Existing MAGIC_EQUAL_SUBST option is more useful; any argument containing
|
||||||
...=~...:~... will perform filename expansion on the ~.
|
...=~...:~... will perform filename expansion on the ~ (previously,
|
||||||
|
the string before `=' had to look like a parameter name).
|
||||||
|
|
||||||
|
Configuration changes:
|
||||||
|
- Generation of signal names should be more reliable
|
||||||
|
- Customizable installation of shell functions from distribution.
|
||||||
|
|
||||||
|
New features in zsh version 3.0.6
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
Most of these changes are designed to improve compatibility with zsh
|
||||||
|
version 3.1.6, the latest development release. However, this release also
|
||||||
|
fixes all known Year 2000 (Y2K) bugs in zsh 3.0.
|
||||||
|
|
||||||
|
History changes:
|
||||||
|
- whitespace between words is ignored in history searches.
|
||||||
|
- new option HIST_REDUCE_BLANKS removes extra whitespace in the stored
|
||||||
|
history.
|
||||||
|
- support for reading (but not writing) version 3.1.6 history files.
|
||||||
|
|
||||||
|
Globbing changes:
|
||||||
|
- the a, c, and m glob qualifiers can now test time in seconds.
|
||||||
|
- globbing of number ranges behaves more like character ranges in that
|
||||||
|
it can match a prefix of a number, e.g. `<1-5>*' matches 1, 2, 3, 4,
|
||||||
|
5, 17, 23skiddoo, 5986, etc., but not 6, 7, 8ball, 911, etc.
|
||||||
|
|
||||||
|
Parameter and expansion changes:
|
||||||
|
- expansion of ~ and other globbing flags via ${~param} do not depend
|
||||||
|
upon EXTENDED_GLOB (bug fix).
|
||||||
|
- nested parameter substitutions require braces (this was always the
|
||||||
|
documented behavior, but previous parsers didn't enforce it).
|
||||||
|
- quote only nested expansion, e.g. ${(f)"$(<file)"} reads complete
|
||||||
|
`file', then splits lines into array.
|
||||||
|
|
||||||
|
Builtin and function changes:
|
||||||
|
- `typeset -U' works on the colon-array version of linked parameters.
|
||||||
|
- `typeset +f' and `functions +' output the names (only) of functions.
|
||||||
|
- `emulate -L' has the effect of `setopt localoptions'.
|
||||||
|
- in fn1() { local foo; unset foo; foo=bar; }, foo is restored at local
|
||||||
|
level, whereas if the `unset foo' appeared in a nested function it
|
||||||
|
would have been restored at global level, which was presumably wrong.
|
||||||
|
- `foo=bar >&file' is a redirection, not a NULLCMD.
|
||||||
|
- any single complex command, such as `case ... esac', parses as if
|
||||||
|
semicolon-terminated (bug fix).
|
||||||
|
- the shell function `preexec', if defined, is run after parsing each
|
||||||
|
command line but before executing the command.
|
||||||
|
|
||||||
|
Other changes:
|
||||||
|
- the option PRINT_EIGHT_BIT causes zsh to emit raw bytes in prompts
|
||||||
|
and completion lists even if the system ctype(3) package says that
|
||||||
|
those bytes are not "printable."
|
||||||
|
|
||||||
|
Debugging enhancements:
|
||||||
|
- LINENO is now very much more useful in scripts and functions and is
|
||||||
|
reported correctly in most error messages.
|
||||||
|
- ERREXIT behavior is now consistent with newer Bourne-like shells,
|
||||||
|
e.g. with respect to `if' tests that fail.
|
||||||
|
|
||||||
Configuration changes:
|
Configuration changes:
|
||||||
- Large file and 64-bit integers on 32-bit machines supported where
|
- Large file and 64-bit integers on 32-bit machines supported where
|
||||||
provided by OS.
|
provided by OS.
|
||||||
- generation of signal names should be more reliable
|
- a few more system features, such as getpwnam/getpwuid, are tested for.
|
||||||
- Customizable installation of shell functions from distribution.
|
|
||||||
|
|
||||||
|
|
||||||
New features in zsh version 3.1 (beta version)
|
New features in zsh version 3.1 (beta version)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
emulate -L zsh
|
emulate -L zsh
|
||||||
|
|
||||||
local opt optlist once
|
local opt optlist once dir
|
||||||
|
|
||||||
while [[ $1 = -* ]]; do
|
while [[ $1 = -* ]]; do
|
||||||
if [[ $1 = - || $1 = -- ]]; then
|
if [[ $1 = - || $1 = -- ]]; then
|
||||||
|
@ -61,10 +61,20 @@ if [[ -z $EMAIL_ADDR ]]; then
|
||||||
print "Using $EMAIL_ADDR as anonymous FTP password."
|
print "Using $EMAIL_ADDR as anonymous FTP password."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $1 = */* ]]; then
|
||||||
|
1=${1##ftp://}
|
||||||
|
dir=${1#*/}
|
||||||
|
1=${1%%/*}
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $once = 1 ]]; then
|
if [[ $once = 1 ]]; then
|
||||||
zftp open $1 anonymous $EMAIL_ADDR
|
zftp open $1 anonymous $EMAIL_ADDR || return 1
|
||||||
else
|
else
|
||||||
zftp params $1 anonymous $EMAIL_ADDR
|
zftp params $1 anonymous $EMAIL_ADDR
|
||||||
zftp open
|
zftp open || return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n $dir ]]; then
|
||||||
|
zfcd $dir
|
||||||
fi
|
fi
|
||||||
# }
|
# }
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
# function zfget {
|
# function zfget {
|
||||||
# Get files from remote server. Options:
|
# Get files from remote server. Options:
|
||||||
|
# -c cat: dump files to stdout.
|
||||||
|
# alias zfcat="zfget -c"
|
||||||
|
# zfpage() { zfget -c "$@" | eval $PAGER }
|
||||||
|
# are sensible things to do, but aren't done for you. Note the
|
||||||
|
# second doesn't work on all OS's.
|
||||||
# -G don't to remote globbing, else do
|
# -G don't to remote globbing, else do
|
||||||
# -t update the local file times to the same time as the remote.
|
# -t update the local file times to the same time as the remote.
|
||||||
# Currently this only works if you have the `perl' command,
|
# Currently this only works if you have the `perl' command,
|
||||||
# and that perl is version 5 with the standard library.
|
# and that perl is version 5 with the standard library.
|
||||||
# See the function zfrtime for more gory details.
|
# See the function zfrtime for more gory details. This has
|
||||||
|
# no effect with the -c option.
|
||||||
#
|
#
|
||||||
# If the connection is not currently open, try to open it with the current
|
# If the connection is not currently open, try to open it with the current
|
||||||
# parameters (set by a previous zfopen or zfparams), then close it after
|
# parameters (set by a previous zfopen or zfparams), then close it after
|
||||||
|
@ -13,7 +19,7 @@
|
||||||
|
|
||||||
emulate -L zsh
|
emulate -L zsh
|
||||||
|
|
||||||
local loc rem optlist opt nglob remlist time
|
local loc rem optlist opt nglob remlist time cat
|
||||||
integer stat do_close
|
integer stat do_close
|
||||||
|
|
||||||
while [[ $1 == -* ]]; do
|
while [[ $1 == -* ]]; do
|
||||||
|
@ -29,6 +35,8 @@ while [[ $1 == -* ]]; do
|
||||||
;;
|
;;
|
||||||
t) time=1
|
t) time=1
|
||||||
;;
|
;;
|
||||||
|
c) cat=1
|
||||||
|
;;
|
||||||
*) print option $opt not recognised >&2
|
*) print option $opt not recognised >&2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -48,12 +56,17 @@ for remlist in $*; do
|
||||||
fi
|
fi
|
||||||
if (( $#remlist )); then
|
if (( $#remlist )); then
|
||||||
for rem in $remlist; do
|
for rem in $remlist; do
|
||||||
|
if [[ -n $cat ]]; then
|
||||||
|
zftp get $rem
|
||||||
|
stat=$?
|
||||||
|
else
|
||||||
loc=${rem:t}
|
loc=${rem:t}
|
||||||
if zftp get $rem >$loc; then
|
if zftp get $rem >$loc; then
|
||||||
[[ $time = 1 ]] && zfrtime $rem $loc
|
[[ $time = 1 ]] && zfrtime $rem $loc
|
||||||
else
|
else
|
||||||
stat=1
|
stat=1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
emulate -L zsh
|
emulate -L zsh
|
||||||
|
|
||||||
local optlist opt once
|
local optlist opt once dir
|
||||||
|
|
||||||
while [[ $1 = -* ]]; do
|
while [[ $1 = -* ]]; do
|
||||||
if [[ $1 = - || $1 = -- ]]; then
|
if [[ $1 = - || $1 = -- ]]; then
|
||||||
|
@ -31,12 +31,22 @@ done
|
||||||
# both .netrc and .ncftp/bookmarks . We could even try saving
|
# both .netrc and .ncftp/bookmarks . We could even try saving
|
||||||
# the info in their for new hosts, like ncftp does.
|
# the info in their for new hosts, like ncftp does.
|
||||||
|
|
||||||
|
if [[ $1 = */* ]]; then
|
||||||
|
1=${1##ftp://}
|
||||||
|
dir=${1#*/}
|
||||||
|
1=${1%%/*}
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $once = 1 ]]; then
|
if [[ $once = 1 ]]; then
|
||||||
zftp open $*
|
zftp open $* || return 1
|
||||||
else
|
else
|
||||||
# set parameters, but only if there was at least a host
|
# set parameters, but only if there was at least a host
|
||||||
(( $# > 0 )) && zfparams $*
|
(( $# > 0 )) && zfparams $*
|
||||||
# now call with no parameters
|
# now call with no parameters
|
||||||
zftp open
|
zftp open || return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n $dir ]]; then
|
||||||
|
zfcd $dir
|
||||||
fi
|
fi
|
||||||
# }
|
# }
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
# function zftp_chpwd {
|
# function zftp_chpwd {
|
||||||
# You may want to alter chpwd to call this when $ZFTP_USER is set.
|
# You may want to alter chpwd to call this when $ZFTP_USER is set.
|
||||||
|
|
||||||
|
# If the directory really changed...
|
||||||
|
if [[ $ZFTP_PWD != $zflastdir ]]; then
|
||||||
# Cancel the filename cache for the current directory.
|
# Cancel the filename cache for the current directory.
|
||||||
zftp_fcache=()
|
zftp_fcache=()
|
||||||
# ...and also empty the stored directory listing cache.
|
# ...and also empty the stored directory listing cache.
|
||||||
|
@ -8,6 +10,7 @@ zftp_fcache=()
|
||||||
# is the only place we need to do these two things.
|
# is the only place we need to do these two things.
|
||||||
[[ -n $zfcurdir && -f $zfcurdir ]] && rm -f $zfcurdir
|
[[ -n $zfcurdir && -f $zfcurdir ]] && rm -f $zfcurdir
|
||||||
zfotherargs=
|
zfotherargs=
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -z $ZFTP_USER ]]; then
|
if [[ -z $ZFTP_USER ]]; then
|
||||||
# last call, after an FTP logout
|
# last call, after an FTP logout
|
||||||
|
|
|
@ -563,7 +563,7 @@ cvsprefix() {
|
||||||
cvsentries() {
|
cvsentries() {
|
||||||
setopt localoptions nullglob unset
|
setopt localoptions nullglob unset
|
||||||
if [[ -f ${pref}CVS/Entries ]]; then
|
if [[ -f ${pref}CVS/Entries ]]; then
|
||||||
reply=( "${pref}${^${(@)${(@)${(f@)$(<${pref}CVS/Entries)}:#D*}#/}%%/*}" )
|
reply=( "${pref}${(@)^${(@)${(@)${(f@)$(<${pref}CVS/Entries)}:#D*}#/}%%/*}" )
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ clwords
|
||||||
clwpos
|
clwpos
|
||||||
clwsize
|
clwsize
|
||||||
cmatcher
|
cmatcher
|
||||||
compcommand
|
|
||||||
compcontext
|
compcontext
|
||||||
compctltab
|
compctltab
|
||||||
compcurrent
|
compcurrent
|
||||||
|
@ -33,7 +32,6 @@ compoldins
|
||||||
compparameter
|
compparameter
|
||||||
comppatinsert
|
comppatinsert
|
||||||
comppatmatch
|
comppatmatch
|
||||||
comppms
|
|
||||||
compprefix
|
compprefix
|
||||||
compredirect
|
compredirect
|
||||||
compqiprefix
|
compqiprefix
|
||||||
|
@ -55,7 +53,6 @@ freecompctl
|
||||||
getcpatptr
|
getcpatptr
|
||||||
incompctlfunc
|
incompctlfunc
|
||||||
incompfunc
|
incompfunc
|
||||||
instring
|
|
||||||
makecomplistcallptr
|
makecomplistcallptr
|
||||||
makecomplistctlptr
|
makecomplistctlptr
|
||||||
makecompparamsptr
|
makecompparamsptr
|
||||||
|
|
|
@ -27,8 +27,6 @@ lmatches
|
||||||
menuacc
|
menuacc
|
||||||
menucmp
|
menucmp
|
||||||
menucomplete
|
menucomplete
|
||||||
menucur
|
|
||||||
menugrp
|
|
||||||
minfo
|
minfo
|
||||||
newkeymap
|
newkeymap
|
||||||
nlnct
|
nlnct
|
||||||
|
|
|
@ -568,6 +568,8 @@ acceptlast(void)
|
||||||
cs = minfo.pos + minfo.len + minfo.insc - (*(minfo.cur))->qisl;
|
cs = minfo.pos + minfo.len + minfo.insc - (*(minfo.cur))->qisl;
|
||||||
if (cs < l)
|
if (cs < l)
|
||||||
foredel(l - cs);
|
foredel(l - cs);
|
||||||
|
else if (cs > ll)
|
||||||
|
cs = ll;
|
||||||
inststrlen(" ", 1, 1);
|
inststrlen(" ", 1, 1);
|
||||||
if (parpre)
|
if (parpre)
|
||||||
inststr(parpre);
|
inststr(parpre);
|
||||||
|
@ -2121,6 +2123,7 @@ abort_match(void)
|
||||||
{
|
{
|
||||||
free_cline(matchparts);
|
free_cline(matchparts);
|
||||||
free_cline(matchsubs);
|
free_cline(matchsubs);
|
||||||
|
matchparts = matchsubs = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This adds a new string in the static char buffer. The arguments are
|
/* This adds a new string in the static char buffer. The arguments are
|
||||||
|
@ -2615,6 +2618,7 @@ comp_match(char *pfx, char *sfx, char *w, Comp cp,
|
||||||
chuck(r);
|
chuck(r);
|
||||||
/* We still break it into parts here, trying to build a sensible
|
/* We still break it into parts here, trying to build a sensible
|
||||||
* cline list for these matches, too. */
|
* cline list for these matches, too. */
|
||||||
|
w = dupstring(w);
|
||||||
wl = strlen(w);
|
wl = strlen(w);
|
||||||
*clp = bld_parts(w, wl, wl, NULL);
|
*clp = bld_parts(w, wl, wl, NULL);
|
||||||
*exact = 0;
|
*exact = 0;
|
||||||
|
@ -6280,8 +6284,8 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd)
|
||||||
gen_matches_files(1, 0, 0);
|
gen_matches_files(1, 0, 0);
|
||||||
/* The compctl has a glob pattern (compctl -g). */
|
/* The compctl has a glob pattern (compctl -g). */
|
||||||
if (cc->glob) {
|
if (cc->glob) {
|
||||||
int ns, pl = strlen(prpre), o;
|
int ns, pl = strlen(prpre), o, paalloc;
|
||||||
char *g = dupstring(cc->glob), pa[PATH_MAX];
|
char *g = dupstring(cc->glob), *pa;
|
||||||
char *p2, *p3;
|
char *p2, *p3;
|
||||||
int ne = noerrs, md = opts[MARKDIRS];
|
int ne = noerrs, md = opts[MARKDIRS];
|
||||||
|
|
||||||
|
@ -6295,8 +6299,9 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd)
|
||||||
}
|
}
|
||||||
noerrs = 1;
|
noerrs = 1;
|
||||||
addwhat = -6;
|
addwhat = -6;
|
||||||
|
o = strlen(prpre);
|
||||||
|
pa = (char *)zalloc(paalloc = o + PATH_MAX);
|
||||||
strcpy(pa, prpre);
|
strcpy(pa, prpre);
|
||||||
o = strlen(pa);
|
|
||||||
opts[MARKDIRS] = 0;
|
opts[MARKDIRS] = 0;
|
||||||
|
|
||||||
/* The compctl -g string may contain more than *
|
/* The compctl -g string may contain more than *
|
||||||
|
@ -6335,6 +6340,10 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd)
|
||||||
else {
|
else {
|
||||||
/* It's a simple pattern, so append it to *
|
/* It's a simple pattern, so append it to *
|
||||||
* the path we have on the command line. */
|
* the path we have on the command line. */
|
||||||
|
int minlen = o + strlen(g);
|
||||||
|
if (minlen >= paalloc)
|
||||||
|
pa = (char *)
|
||||||
|
zrealloc(pa, paalloc = minlen+1);
|
||||||
strcpy(pa + o, g);
|
strcpy(pa + o, g);
|
||||||
addlinknode(l, dupstring(pa));
|
addlinknode(l, dupstring(pa));
|
||||||
}
|
}
|
||||||
|
@ -6380,6 +6389,8 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd)
|
||||||
glob_pre = glob_suf = NULL;
|
glob_pre = glob_suf = NULL;
|
||||||
noerrs = ne;
|
noerrs = ne;
|
||||||
opts[MARKDIRS] = md;
|
opts[MARKDIRS] = md;
|
||||||
|
|
||||||
|
zfree(pa, paalloc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dirs++;
|
dirs++;
|
||||||
|
|
|
@ -700,7 +700,7 @@ hbegin(int dohist)
|
||||||
{
|
{
|
||||||
isfirstln = isfirstch = 1;
|
isfirstln = isfirstch = 1;
|
||||||
errflag = histdone = spaceflag = 0;
|
errflag = histdone = spaceflag = 0;
|
||||||
stophist = (dohist ? ((!interact || unset(SHINSTDIN)) << 1) : 2);
|
stophist = (!dohist || !interact || unset(SHINSTDIN)) ? 2 : 0;
|
||||||
if (stophist == 2 || (inbufflags & INP_ALIAS)) {
|
if (stophist == 2 || (inbufflags & INP_ALIAS)) {
|
||||||
chline = hptr = NULL;
|
chline = hptr = NULL;
|
||||||
hlinesz = 0;
|
hlinesz = 0;
|
||||||
|
@ -721,6 +721,8 @@ hbegin(int dohist)
|
||||||
hwbegin = ihwbegin;
|
hwbegin = ihwbegin;
|
||||||
hwend = ihwend;
|
hwend = ihwend;
|
||||||
addtoline = iaddtoline;
|
addtoline = iaddtoline;
|
||||||
|
if (!isset(BANGHIST))
|
||||||
|
stophist = 4;
|
||||||
}
|
}
|
||||||
chwordpos = 0;
|
chwordpos = 0;
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,6 @@ file_type
|
||||||
filesub
|
filesub
|
||||||
filesubstr
|
filesubstr
|
||||||
findcmd
|
findcmd
|
||||||
firsthist
|
|
||||||
freearray
|
freearray
|
||||||
freeheap
|
freeheap
|
||||||
freelinklist
|
freelinklist
|
||||||
|
@ -112,8 +111,6 @@ haswilds
|
||||||
hcalloc
|
hcalloc
|
||||||
hgetc
|
hgetc
|
||||||
hgetline
|
hgetline
|
||||||
histentarr
|
|
||||||
histentct
|
|
||||||
hist_ring
|
hist_ring
|
||||||
hist_skip_flags
|
hist_skip_flags
|
||||||
holdintr
|
holdintr
|
||||||
|
@ -196,7 +193,6 @@ promptexpand
|
||||||
pushheap
|
pushheap
|
||||||
putshout
|
putshout
|
||||||
pwd
|
pwd
|
||||||
quietgetevent
|
|
||||||
quietgethist
|
quietgethist
|
||||||
quotedzputs
|
quotedzputs
|
||||||
readoutput
|
readoutput
|
||||||
|
|
|
@ -254,7 +254,7 @@ dnl else use -O
|
||||||
if test -n "$auto_cflags"; then
|
if test -n "$auto_cflags"; then
|
||||||
if test "${enable_zsh_debug}" = yes; then
|
if test "${enable_zsh_debug}" = yes; then
|
||||||
if test -n "$GCC"; then
|
if test -n "$GCC"; then
|
||||||
CFLAGS="$CFLAGS -Wall -Wno-implicit -Wmissing-prototypes -pedantic -ggdb"
|
CFLAGS="$CFLAGS -Wall -Wno-implicit -Wmissing-prototypes -ggdb"
|
||||||
else
|
else
|
||||||
CFLAGS="$CFLAGS -g"
|
CFLAGS="$CFLAGS -g"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue