mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
zsh-3.1.6-dev-18
This commit is contained in:
parent
a008690d67
commit
779b36d844
16 changed files with 313 additions and 82 deletions
207
ChangeLog
207
ChangeLog
|
@ -1,5 +1,212 @@
|
|||
2000-02-11 Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
|
||||
|
||||
* pws: Config/version.mk: 3.1.6-dev-18
|
||||
|
||||
* Tanaka Akira: 9683: Completion/User/_diff_options: shut up error
|
||||
messages (after other attempts from Oliver and Bart).
|
||||
|
||||
* Alexandre: 9681: Completion/User/_prcs: argument handling.
|
||||
|
||||
* Sven: 9680: Completion/Core/_files,
|
||||
Completion/Core/_multi_parts, Completion/Core/_path_files,
|
||||
Completion/Core/_sep_parts: use of -M option.
|
||||
|
||||
* Sven: 9677, 9679: Completion/Commands/_read_comp,
|
||||
Completion/Core/_approximate, Completion/Core/_expand,
|
||||
Completion/Core/_main_complete, Completion/Core/_match,
|
||||
Doc/Zsh/compctl.yo, Doc/Zsh/compsys.yo, Doc/Zsh/compwid.yo,
|
||||
Src/Zle/comp.h, Src/Zle/compcore.c, Src/Zle/compctl.c,
|
||||
Src/Zle/complete.c: $compmatchers bites the dust, use new matcher
|
||||
style.
|
||||
|
||||
* Sven: 9676: Src/Zle/computil.c: yet more argument subtleties.
|
||||
|
||||
* Tanaka Akira: 9674: Test/10prompt.ztst: some nameless idiot got
|
||||
the bits of the date wrong.
|
||||
|
||||
* Sven: 9664: Completion/Core/_path_files: optimisation with
|
||||
arrays.
|
||||
|
||||
* Sven: 9659: Doc/Zsh/compsys.yo: mention complete-in-words
|
||||
behaviour.
|
||||
|
||||
* Sven: 9657: Completion/Core/_approximate,
|
||||
Completion/Core/_description, Completion/Core/_main_complete,
|
||||
Completion/Core/_matcher, Completion/Core/_path_files,
|
||||
Completion/Core/_prefix, Doc/Zsh/compsys.yo, Src/Zle/complete.c
|
||||
(plus Completion/Core/.distfiles change by hand): new _matcher
|
||||
completer allows more control along the lines of $compmatchers.
|
||||
|
||||
* Johan: 9653: Functions/Misc/is-at-least,
|
||||
Functions/Misc/.distfiles (added by hand): function to check
|
||||
version numbers.
|
||||
|
||||
* Johan: 9651: Completion/User/_cvs: handle no CVS tags case better.
|
||||
|
||||
* Sven: 9650: Completion/User/_gunzip, Completion/User/_gzip:
|
||||
handle .tgz files.
|
||||
|
||||
* Sven: 9648: Completion/Core/_files,
|
||||
Completion/Core/_multi_parts, Completion/Core/_path_files,
|
||||
Completion/Core/_sep_parts, Doc/Zsh/mod_zutil.yo,
|
||||
Src/Modules/zutil.c: Bartised version of zparseopts;
|
||||
fix _path_files -S ''.
|
||||
|
||||
* Bart: 9639: Doc/Zsh/options.yo, Doc/Zsh/redirect.yo: typos in
|
||||
9625.
|
||||
|
||||
* Tanaka Akira: 9638: Completion/User/_cvs: _cvs_rtag had no
|
||||
default implementation.
|
||||
|
||||
* Sven: 9635: Completion/Core/_description,
|
||||
Completion/Core/_files, Completion/Core/_multi_parts,
|
||||
Completion/Core/_path_files, Completion/Core/_sep_parts,
|
||||
Doc/Zsh/mod_zutil.yo, Src/Modules/zutil.c, Src/Modules/zutil.mdd:
|
||||
improved performance for completion functions; option-parsing
|
||||
builtin.
|
||||
|
||||
* Akim Demaille <akim@epita.fr>: 9634: Src/builtin.c: trap '' 1
|
||||
segfaulted.
|
||||
|
||||
* Sven: 9633: Src/init.c: change logic in 9591.
|
||||
|
||||
* Sven: 9632: Test/05command.ztst: error spotted by improved
|
||||
autoload error checking.
|
||||
|
||||
* Alexandre: 9625: Src/zsh.h, Src/options.c, Src/init.c,
|
||||
Src/exec.c, Doc/Zsh/redirect.yo, Doc/Zsh/options.yo: SHNULLCMD and
|
||||
CSHNULLCMD options to allow better sh/csh emulation without
|
||||
fiddling with parameters.
|
||||
|
||||
* Sven: 9623: Completion/Core/_path_files: another version of
|
||||
9616.
|
||||
|
||||
* Sven: 9621: Src/Zle/computil.c: completion incorrectly adding
|
||||
space.
|
||||
|
||||
* Sven: 9619: Completion/User/_texi: completion for texinfo;
|
||||
added Completion/User/.distfiles by hand.
|
||||
|
||||
* Sven: 9618: Src/Zle/computil.c: memory leak in caching.
|
||||
|
||||
* Sven: 9616: Completion/Core/_path_files: bad test with a
|
||||
pattern.
|
||||
|
||||
* Sven: 9615: Completion/Builtins/_zstyle, Doc/Zsh/compsys.yo:
|
||||
rename and document some styles.
|
||||
|
||||
* Sven: 9614: Src/exec.c: esglob wasn't initialised properly.
|
||||
|
||||
* Alexandre: 9606: Completion/Builtins/_zstyle: two missing
|
||||
styles.
|
||||
|
||||
* Sven: 9600: Src/exec.c: wordcode problem in execpline().
|
||||
|
||||
* Bart: 9591: Src/init.c: zsh/compctl didn't get loaded
|
||||
automatically any more.
|
||||
|
||||
* Geoff: 9589: Doc/Makefile.in: put back ^A's from 9584.
|
||||
|
||||
* Tanaka Akira: 9585: Doc/Makefile.in: possible logic problems
|
||||
with 9584.
|
||||
|
||||
* Geoff: 9584: Doc/Makefile.in: sh problems with creating
|
||||
modlist.yo.
|
||||
|
||||
* Alexandre: 9583: Functions/Misc/nslookup: fix context name for
|
||||
new scheme.
|
||||
|
||||
* Sven: 9390, 9394, hunk from 9396: ./Doc/Makefile.in,
|
||||
Doc/Zsh/mod_zpty.yo, Doc/Zsh/.distfiles, Functions/Misc/nslookup,
|
||||
Src/Modules/.distfiles, Src/Modules/zpty.c, Src/Modules/zpty.mdd,
|
||||
Src/builtin.c, Src/init.c, Src/zsh.h: zpty module.
|
||||
|
||||
2000-02-05 Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
|
||||
|
||||
* Tanaka Akira: 9579: Completion/Debian/_deb_packages: was using
|
||||
bad cache variable.
|
||||
|
||||
2000-02-04 Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
|
||||
|
||||
* Sven: 9569: Completion/Core/_main_complete,
|
||||
Completion/Core/_prefix, Doc/Zsh/compsys.yo, Src/Zle/compcore.c:
|
||||
new complete-prefix completer _prefix; fix suffix matching
|
||||
problems.
|
||||
|
||||
* Sven: 9568: Src/Zle/computil.c: fix difficulties with remaining
|
||||
arguments.
|
||||
|
||||
* Sven: 9562: Completion/Base/_arg_compile,
|
||||
Completion/Base/_arguments, Completion/Base/_command_names,
|
||||
Completion/Builtins/_hash, Completion/User/_gdb,
|
||||
Completion/User/_ssh, Completion/User/_strip, Completion/X/_xrdb,
|
||||
Completion/X/_xutils, Src/Zle/computil.c: failure to follow links
|
||||
completing commands; bad long option handling in some cases
|
||||
|
||||
* Sven: 9560 (second hunk only): Src/Zle/computil.c: more
|
||||
argument fixes.
|
||||
|
||||
* Sven: 9559: Doc/Zsh/compsys.yo: better documentation for `+'
|
||||
argument handling.
|
||||
|
||||
* Sven: 9558: Src/exec.c, Src/parse.c: trapping of autoloading
|
||||
errors wasn't up to scratch.
|
||||
|
||||
* Alexandre: 9557: Completion/User/_flex: problem handling
|
||||
`+' argument.
|
||||
|
||||
2000-02-03 Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
|
||||
|
||||
* Oliver: 9547: Src/parse.c, Src/hist.c: more fixups for exporting
|
||||
on AIX.
|
||||
|
||||
* Sven: 9546: Completion/Base/_arguments,
|
||||
Completion/Base/_combination, Completion/Base/_describe,
|
||||
Completion/Base/_first, Completion/Base/_jobs,
|
||||
Completion/Base/_subscript, Completion/Base/_tilde,
|
||||
Completion/Base/_values, Completion/Builtins/_pids,
|
||||
Completion/Builtins/_popd, Completion/Builtins/_sched,
|
||||
Completion/Builtins/_signals, Completion/Builtins/_stat,
|
||||
Completion/Builtins/_zftp, Completion/Builtins/_zstyle,
|
||||
Completion/Commands/_complete_help,
|
||||
Completion/Commands/_correct_word,
|
||||
Completion/Commands/_expand_word,
|
||||
Completion/Commands/_history_complete_word,
|
||||
Completion/Core/_alternative, Completion/Core/_approximate,
|
||||
Completion/Core/_complete, Completion/Core/_correct,
|
||||
Completion/Core/_description, Completion/Core/_expand,
|
||||
Completion/Core/_files, Completion/Core/_list,
|
||||
Completion/Core/_main_complete, Completion/Core/_match,
|
||||
Completion/Core/_menu, Completion/Core/_message,
|
||||
Completion/Core/_normal, Completion/Core/_oldlist,
|
||||
Completion/Core/_path_files, Completion/Core/_setup,
|
||||
Completion/Core/_sort_tags, Completion/Core/_tags,
|
||||
Completion/Core/compinit, Completion/Debian/_apt,
|
||||
Completion/Debian/_deb_packages, Completion/User/_cvs,
|
||||
Completion/User/_domains, Completion/User/_groups,
|
||||
Completion/User/_hosts, Completion/User/_ports,
|
||||
Completion/User/_socket, Completion/User/_urls,
|
||||
Completion/User/_users, Completion/X/_x_color, Doc/Zsh/compsys.yo,
|
||||
Etc/completion-style-guide,
|
||||
Functions/Zle/incremental-complete-word, Functions/Zle/predict-on:
|
||||
more consistent form for style contexts in completion system,
|
||||
:completion:<func>:<completer>:<command>:<argument>:<tag>.
|
||||
|
||||
* Sven: 9545: Src/Modules/zutil.c: don't use freed structs.
|
||||
|
||||
* Tanaka Akira: 9544: Src/Modules/zutil.c: handle case for
|
||||
undefined match data in zregexparse.
|
||||
|
||||
* Sven: 9542: Src/Zle/complete.c: use permanently allocated memory
|
||||
for copied special parameters.
|
||||
|
||||
* Sven: 9541: Src/Modules/zutil.c: zstyle looks up style names
|
||||
first.
|
||||
|
||||
2000-02-02 Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
|
||||
|
||||
* pws: Config/version.mk: version 3.1.6-dev-17
|
||||
|
||||
* Bart: 9533: Src/signals.c: make sure shell doesn't send itself
|
||||
SIGHUP when exiting.
|
||||
|
||||
|
|
|
@ -256,8 +256,8 @@ if (( $# )) && comparguments -i "$autod" "$@"; then
|
|||
|
||||
if [[ -z "$matched$mesg" ]] && _requested options &&
|
||||
{ ! zstyle -t ":completion:${curcontext}:options" prefix-needed ||
|
||||
[[ ( "$origpre" = [-+]* || -z "$aret$mesg" ) &&
|
||||
nm -eq compstate[nmatches] ]] } ; then
|
||||
[[ "$origpre" = [-+]* ||
|
||||
( -z "$aret$mesg" && nm -eq compstate[nmatches] ) ]] } ; then
|
||||
local prevpre="$PREFIX" previpre="$IPREFIX"
|
||||
|
||||
PREFIX="$origpre"
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
DISTFILES_SRC='
|
||||
.distfiles
|
||||
_alternative _approximate _compalso _complete _correct _description
|
||||
_expand _files _funcall _list _main_complete _match
|
||||
_matcher _menu _multi_parts _message _normal _oldlist
|
||||
_options _parameters _path_files _prefix _requested
|
||||
_sep_parts _set_options _setup _sort_tags _tags
|
||||
_expand _files _funcall _list _main_complete _match _matcher
|
||||
_menu _multi_parts _message _normal _oldlist _options
|
||||
_parameters _path_files _prefix _requested _sep_parts
|
||||
_set_options _setup _sort_tags _tags
|
||||
_unset_options _wanted
|
||||
compdump compinit compinstall
|
||||
'
|
||||
|
|
|
@ -38,9 +38,5 @@ if (( ! $+_mailbox_cache )) then
|
|||
_mailbox_cache=($_mailbox_cache $mboxes $maildirboxes $MHboxes)
|
||||
fi
|
||||
|
||||
if _wanted files expl 'mailbox specification'; then
|
||||
local opre=$PREFIX
|
||||
[[ $PREFIX = +* ]] && PREFIX="$~maildirectory/${PREFIX#+}"
|
||||
_wanted files expl 'mailbox specification' &&
|
||||
compadd "$@" "$expl[@]" - "$_mailbox_cache[@]"
|
||||
PREFIX=$opre
|
||||
fi
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#compdef mutt
|
||||
|
||||
local curcontext="$curcontext" state line ret=1
|
||||
local curcontext="$curcontext" state line muttrc="~/.muttrc" ret=1
|
||||
|
||||
_arguments -C \
|
||||
'::recipient:->userhost' \
|
||||
|
|
|
@ -27,5 +27,5 @@
|
|||
# This must also serve as a shell script, so do not add spaces around the
|
||||
# `=' signs.
|
||||
|
||||
VERSION=3.1.6-dev-17
|
||||
VERSION_DATE='February 2, 2000'
|
||||
VERSION=3.1.6-dev-18
|
||||
VERSION_DATE='February 11, 2000'
|
||||
|
|
|
@ -51,7 +51,7 @@ zshoptions.1 zshparam.1 zshzftpsys.1 zshzle.1 zshall.1
|
|||
|
||||
# yodl documentation
|
||||
|
||||
YODLDOC = $(MAN) texi
|
||||
YODLDOC = $(MAN) zsh.texi
|
||||
|
||||
MODDOCSRC = \
|
||||
Zsh/mod_cap.yo Zsh/mod_clone.yo \
|
||||
|
@ -60,7 +60,7 @@ Zsh/mod_computil.yo \
|
|||
Zsh/mod_deltochar.yo Zsh/mod_example.yo Zsh/mod_files.yo \
|
||||
Zsh/mod_mapfile.yo Zsh/mod_mathfunc.yo Zsh/mod_parameter.yo Zsh/mod_sched.yo \
|
||||
Zsh/mod_stat.yo Zsh/mod_zftp.yo Zsh/mod_zle.yo Zsh/mod_zleparameter.yo \
|
||||
Zsh/mod_zutil.yo Zsh/mod_zprof.yo
|
||||
Zsh/mod_zutil.yo Zsh/mod_zprof.yo Zsh/mod_zpty.yo
|
||||
|
||||
YODLSRC = zmacros.yo zman.yo ztexi.yo Zsh/arith.yo Zsh/builtins.yo \
|
||||
Zsh/compat.yo Zsh/compctl.yo Zsh/compsys.yo Zsh/compwid.yo Zsh/cond.yo \
|
||||
|
@ -73,30 +73,25 @@ Zsh/seealso.yo Zsh/zftpsys.yo Zsh/zle.yo
|
|||
|
||||
# ========== DEPENDENCIES FOR BUILDING ==========
|
||||
|
||||
all: man texi ../META-FAQ
|
||||
all: $(MAN) zsh.texi ../META-FAQ
|
||||
.PHONY: all
|
||||
|
||||
everything: all dvi ps html
|
||||
everything: all zsh.dvi zsh_us.ps zsh_a4.ps zsh_toc.html
|
||||
.PHONY: everything
|
||||
|
||||
dvi: zsh.dvi
|
||||
.PHONY: dvi
|
||||
|
||||
zsh.dvi: $(sdir)/zsh.texi
|
||||
$(TEXI2DVI) $<
|
||||
$(TEXI2DVI) $(sdir)/zsh.texi
|
||||
|
||||
texi: $(sdir)/zsh.texi
|
||||
.PHONY: texi
|
||||
|
||||
$(sdir)/zsh.texi:
|
||||
$(YODL) -o $@ -I$(sdir) -w ztexi.yo version.yo zsh.yo; \
|
||||
test -f $@
|
||||
|
||||
info: zsh.info
|
||||
.PHONY: info
|
||||
zsh.texi $(sdir)/zsh.texi:
|
||||
case $@ in \
|
||||
*/*) target=$@ ;; \
|
||||
*) target=$(sdir)/$@ ;; \
|
||||
esac; \
|
||||
$(YODL) -o $$target -I$(sdir) -w ztexi.yo version.yo zsh.yo; \
|
||||
test -f $$target
|
||||
|
||||
zsh.info: $(sdir)/zsh.texi
|
||||
$(MAKEINFO) $<
|
||||
$(MAKEINFO) $(sdir)/zsh.texi
|
||||
|
||||
.yo.1:
|
||||
case $@ in \
|
||||
|
@ -108,26 +103,14 @@ zsh.info: $(sdir)/zsh.texi
|
|||
;; esac; \
|
||||
test -f $$target
|
||||
|
||||
ps: us_ps a4_ps
|
||||
.PHONY: ps
|
||||
|
||||
us_ps: zsh_us.ps
|
||||
.PHONY: us_ps
|
||||
|
||||
zsh_us.ps: zsh.dvi
|
||||
$(DVIPS) -t letter -o $@ $<
|
||||
|
||||
a4_ps: zsh_a4.ps
|
||||
.PHONY: a4_ps
|
||||
$(DVIPS) -t letter -o $@ zsh.dvi
|
||||
|
||||
zsh_a4.ps: zsh.dvi
|
||||
$(DVIPS) -t a4 -o $@ $<
|
||||
|
||||
html: zsh_toc.html
|
||||
.PHONY: html
|
||||
$(DVIPS) -t a4 -o $@ zsh.dvi
|
||||
|
||||
zsh_toc.html: $(sdir)/zsh.texi
|
||||
$(TEXI2HTML) $<
|
||||
$(TEXI2HTML) $(sdir)/zsh.texi
|
||||
|
||||
zshall.1: zsh.yo
|
||||
case $@ in \
|
||||
|
@ -147,10 +130,7 @@ zshall.1: zsh.yo
|
|||
|
||||
$(YODLDOC): version.yo
|
||||
|
||||
$(sdir)/zsh.texi: $(YODLSRC)
|
||||
|
||||
man: $(MAN)
|
||||
.PHONY: man
|
||||
zsh.texi: $(YODLSRC)
|
||||
|
||||
$(MAN): zmacros.yo zman.yo
|
||||
|
||||
|
@ -245,7 +225,7 @@ uninstall: uninstall.man
|
|||
.PHONY: uninstall
|
||||
|
||||
# install man pages, creating install directory if necessary
|
||||
install.man: man
|
||||
install.man: $(MAN)
|
||||
$(sdir_top)/mkinstalldirs $(DESTDIR)$(mandir)/man1
|
||||
for file in $(MAN); do \
|
||||
$(INSTALL_DATA) $(sdir)/$$file $(DESTDIR)$(mandir)/man1/`echo $$file | sed 's|zsh|$(tzsh)|'` || exit 1; \
|
||||
|
@ -253,7 +233,7 @@ install.man: man
|
|||
.PHONY: install.man
|
||||
|
||||
# install info pages, creating install directory if necessary
|
||||
install.info: texi
|
||||
install.info: zsh.texi
|
||||
$(sdir_top)/mkinstalldirs $(DESTDIR)$(infodir)
|
||||
rm -rf infodir
|
||||
mkdir infodir
|
||||
|
@ -287,7 +267,7 @@ uninstall.info:
|
|||
.PHONY: uninstall.info
|
||||
|
||||
# install HTML manual
|
||||
install.html: html
|
||||
install.html: zsh_toc.html
|
||||
$(sdir_top)/mkinstalldirs $(DESTDIR)$(htmldir)
|
||||
for file in zsh_*.html; do \
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(htmldir) || exit 1; \
|
||||
|
|
|
@ -7,7 +7,7 @@ DISTFILES_SRC='
|
|||
mod_computil.yo mod_deltochar.yo mod_example.yo mod_files.yo
|
||||
mod_mapfile.yo mod_mathfunc.yo mod_parameter.yo mod_sched.yo
|
||||
mod_stat.yo mod_zftp.yo mod_zle.yo mod_zleparameter.yo mod_zutil.yo
|
||||
mod_zprof.yo
|
||||
mod_zprof.yo mod_zpty.yo
|
||||
modules.yo modmenu.yo manmodmenu.yo
|
||||
options.yo params.yo prompt.yo redirect.yo restricted.yo seealso.yo
|
||||
zftpsys.yo zle.yo
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
DISTFILES_SRC='
|
||||
.distfiles
|
||||
acx allopt cat cdmatch cdmatch2 checkmail colors cx harden mere multicomp
|
||||
nslookup proto pushd randline run-help yp yu zed zless zls zmv
|
||||
acx allopt cat cdmatch cdmatch2 checkmail colors cx harden
|
||||
is-at-least mere multicomp nslookup proto pushd randline
|
||||
run-help yp yu zed zless zls zmv
|
||||
'
|
||||
|
|
33
Functions/Misc/is-at-least
Normal file
33
Functions/Misc/is-at-least
Normal file
|
@ -0,0 +1,33 @@
|
|||
# $Id: is-at-least,v 1.1.1.1 2000/02/11 19:46:46 akr Exp $ -*- shell-script -*-
|
||||
#
|
||||
# Test whether $ZSH_VERSION (or some value of your choice, if a second argument
|
||||
# is provided) is greater than or equal to x.y.z-r (in argument one). In fact,
|
||||
# it'll accept any dot/dash-separated string of numbers as its second argument
|
||||
# and compare it to the dot/dash-separated first argument. Leading non-number
|
||||
# parts of a segment (such as the "zefram" in 3.1.2-zefram4) are not considered
|
||||
# when the comparison is done; only the numbers matter. Any left-out segments
|
||||
# in the first argument that are present in the version string compared are
|
||||
# considered as zeroes, eg 3 == 3.0 == 3.0.0 == 3.0.0.0 and so on.
|
||||
#
|
||||
# Usage examples:
|
||||
# is-at-least 3.1.6-15 && setopt NO_GLOBAL_RCS
|
||||
# is-at-least 3.1.0 && setopt HIST_REDUCE_BLANKS
|
||||
# is-at-least 586 $MACHTYPE && echo 'You could be running Mandrake!'
|
||||
|
||||
function is-at-least()
|
||||
{
|
||||
emulate zsh ; setopt LOCAL_OPTIONS
|
||||
local IFS=".-" min_cnt=0 ver_cnt=0 part min_ver version
|
||||
min_ver=(${=1})
|
||||
version=(${=2:-$ZSH_VERSION} 0)
|
||||
while (( $min_cnt <= ${#min_ver} )) {
|
||||
while [[ "$part" != <-> ]] {
|
||||
[[ $[++ver_cnt] > ${#version} ]] && return 0
|
||||
part=${version[ver_cnt]##*[^0-9]}
|
||||
}
|
||||
[[ $[++min_cnt] > ${#min_ver} ]] && return 0
|
||||
(( part > min_ver[min_cnt] )) && return 0
|
||||
(( part < min_ver[min_cnt] )) && return 1
|
||||
part=''
|
||||
}
|
||||
}
|
|
@ -1,34 +1,33 @@
|
|||
# Simple wrapper function for `nslookup'. With completion if you are using
|
||||
# the function based completion system.
|
||||
|
||||
setopt localoptions completealiases
|
||||
setopt localoptions localtraps completealiases
|
||||
|
||||
local char line compcontext=nslookup pid
|
||||
local tmp line compcontext=nslookup curcontext='nslookup:::' pmpt
|
||||
|
||||
trap 'print -p exit;return' INT
|
||||
zmodload -e zsh/zpty || zmodload -i zsh/zpty
|
||||
|
||||
coproc command nslookup
|
||||
pid=$!
|
||||
trap 'return 130' INT
|
||||
trap 'zpty -d nslookup' EXIT
|
||||
|
||||
while read -pk 1 char; do
|
||||
line="$line$char"
|
||||
[[ "$line" = *'
|
||||
> ' ]] && break
|
||||
done
|
||||
print -nr - "$line"
|
||||
pmpt=()
|
||||
zstyle -s ':nslookup' prompt tmp && pmpt=(-p "$tmp")
|
||||
zstyle -s ':nslookup' rprompt tmp && pmpt=("$pmpt[@]" -r "$tmp")
|
||||
(( $#pmpt )) || pmpt=(-p '> ')
|
||||
|
||||
line=''
|
||||
while vared -p '> ' line; do
|
||||
print -p "$line"
|
||||
line=''
|
||||
while read -pk 1 char; do
|
||||
line="$line$char"
|
||||
[[ "$line" = *'
|
||||
> ' ]] && break
|
||||
done
|
||||
print -nr - "$line"
|
||||
line=''
|
||||
zpty nslookup nslookup
|
||||
|
||||
zpty -r nslookup line '*> '
|
||||
print -nr "$line"
|
||||
|
||||
while line=''; vared -he "$pmpt[@]" line; do
|
||||
print -s "$line"
|
||||
[[ "$line" = exit ]] && break
|
||||
|
||||
zpty -w nslookup "$line"
|
||||
|
||||
zpty -r nslookup line '*> ' || break
|
||||
print -nr "$line"
|
||||
done
|
||||
|
||||
print -p exit
|
||||
wait $pid
|
||||
zpty -w nslookup 'exit'
|
||||
|
|
|
@ -42,7 +42,7 @@ INSTALL = @INSTALL@
|
|||
|
||||
# default target
|
||||
all: config.h
|
||||
@for subdir in Src Doc Etc; do \
|
||||
@for subdir in Src Doc; do \
|
||||
(cd $$subdir && $(MAKE) $(MAKEDEFS) $@) || exit 1; \
|
||||
done
|
||||
|
||||
|
|
|
@ -11,4 +11,5 @@ DISTFILES_SRC='
|
|||
zftp.mdd zftp.c
|
||||
zprof.mdd zprof.c
|
||||
zutil.mdd zutil.c
|
||||
zpty.mdd zpty.c
|
||||
'
|
||||
|
|
|
@ -3219,6 +3219,7 @@ zexit(int val, int from_signal)
|
|||
}
|
||||
if (sigtrapped[SIGEXIT])
|
||||
dotrap(SIGEXIT);
|
||||
runhookdef(EXITHOOK, NULL);
|
||||
if (mypid != getpid())
|
||||
_exit(val);
|
||||
else
|
||||
|
|
|
@ -89,6 +89,11 @@ mod_export int (*getkeyptr) _((int));
|
|||
mod_export int alloc_stackp;
|
||||
#endif
|
||||
|
||||
/**/
|
||||
mod_export struct hookdef zshhooks[] = {
|
||||
HOOKDEF("exit", NULL, HOOKF_ALL),
|
||||
};
|
||||
|
||||
/* keep executing lists until EOF found */
|
||||
|
||||
/**/
|
||||
|
@ -560,6 +565,8 @@ setupvals(void)
|
|||
# endif
|
||||
#endif
|
||||
|
||||
addhookdefs(argzero, zshhooks, sizeof(zshhooks)/sizeof(*zshhooks));
|
||||
|
||||
init_eprog();
|
||||
|
||||
getkeyptr = NULL;
|
||||
|
|
|
@ -1651,3 +1651,9 @@ typedef unsigned char * (*ZleReadFn) _((char *, char *, int));
|
|||
/***************************************/
|
||||
|
||||
#define mod_export
|
||||
|
||||
/***************************************/
|
||||
/* Hooks in core. */
|
||||
/***************************************/
|
||||
|
||||
#define EXITHOOK (zshhooks + 0)
|
||||
|
|
Loading…
Reference in a new issue