aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog290
-rw-r--r--Completion/Base/_first4
-rw-r--r--Completion/Base/_subscript22
-rw-r--r--Completion/Base/_tilde26
-rw-r--r--Completion/Builtins/_autoload2
-rw-r--r--Completion/Builtins/_bindkey2
-rw-r--r--Completion/Builtins/_echotc2
-rw-r--r--Completion/Builtins/_kill6
-rw-r--r--Completion/Builtins/_limits2
-rw-r--r--Completion/Builtins/_wait15
-rw-r--r--Completion/Builtins/_zmodload4
-rw-r--r--Completion/Commands/.distfiles2
-rw-r--r--Completion/Commands/_correct_filename2
-rw-r--r--Completion/Commands/_most_recent_file4
-rw-r--r--Completion/Core/_approximate4
-rw-r--r--Completion/Core/_expand2
-rw-r--r--Completion/Core/_list2
-rw-r--r--Completion/Core/_match20
-rw-r--r--Completion/Core/_path_files16
-rw-r--r--Completion/Core/compdump17
-rw-r--r--Completion/Core/compinit108
-rw-r--r--Completion/Core/compinstall56
-rw-r--r--Completion/User/.distfiles6
-rw-r--r--Completion/User/_chown15
-rw-r--r--Completion/User/_dd5
-rw-r--r--Completion/User/_find6
-rw-r--r--Completion/User/_groups6
-rw-r--r--Completion/User/_make24
-rw-r--r--Completion/User/_mh6
-rw-r--r--Completion/User/_rlogin2
-rw-r--r--Completion/User/_x_options6
-rw-r--r--Config/.cvsignore1
-rw-r--r--Config/version.mk4
-rw-r--r--Doc/.distfiles10
-rw-r--r--Doc/Makefile.in13
-rw-r--r--Doc/Zsh/.distfiles2
-rw-r--r--Doc/Zsh/builtins.yo62
-rw-r--r--Doc/Zsh/compctl.yo21
-rw-r--r--Doc/Zsh/compsys.yo111
-rw-r--r--Doc/Zsh/compwid.yo11
-rw-r--r--Doc/Zsh/func.yo6
-rw-r--r--Doc/Zsh/guide.yo4
-rw-r--r--Doc/Zsh/mod_compctl.yo2
-rw-r--r--Doc/Zsh/mod_complist.yo119
-rw-r--r--Doc/Zsh/mod_deltochar.yo2
-rw-r--r--Doc/Zsh/mod_zle.yo54
-rw-r--r--Doc/Zsh/modules.yo5
-rw-r--r--Doc/Zsh/options.yo27
-rw-r--r--Doc/Zsh/params.yo21
-rw-r--r--Doc/Zsh/zftpsys.yo6
-rw-r--r--Doc/Zsh/zle.yo57
-rw-r--r--Doc/zsh.yo6
-rw-r--r--Doc/ztexi.yo5
-rw-r--r--Etc/FAQ.yo145
-rw-r--r--Functions/Zftp/zfgoto86
-rw-r--r--Functions/Zftp/zfmark49
-rw-r--r--Src/Modules/parameter.c2
-rw-r--r--Src/Zle/.distfiles1
-rw-r--r--Src/Zle/comp.h25
-rw-r--r--Src/Zle/compctl.c14
-rw-r--r--Src/Zle/complist.c918
-rw-r--r--Src/Zle/complist.mdd3
-rw-r--r--Src/Zle/deltochar.c7
-rw-r--r--Src/Zle/iwidgets.list1
-rw-r--r--Src/Zle/zle.export34
-rw-r--r--Src/Zle/zle.h25
-rw-r--r--Src/Zle/zle_hist.c467
-rw-r--r--Src/Zle/zle_keymap.c65
-rw-r--r--Src/Zle/zle_main.c79
-rw-r--r--Src/Zle/zle_misc.c241
-rw-r--r--Src/Zle/zle_move.c248
-rw-r--r--Src/Zle/zle_params.c22
-rw-r--r--Src/Zle/zle_refresh.c10
-rw-r--r--Src/Zle/zle_thingy.c111
-rw-r--r--Src/Zle/zle_tricky.c602
-rw-r--r--Src/Zle/zle_utils.c45
-rw-r--r--Src/Zle/zle_vi.c371
-rw-r--r--Src/Zle/zle_word.c194
-rw-r--r--Src/builtin.c144
-rw-r--r--Src/exec.c154
-rw-r--r--Src/glob.c2
-rw-r--r--Src/hashtable.c1
-rw-r--r--Src/hist.c9
-rw-r--r--Src/init.c32
-rw-r--r--Src/input.c35
-rw-r--r--Src/jobs.c9
-rw-r--r--Src/lex.c5
-rw-r--r--Src/loop.c21
-rw-r--r--Src/module.c254
-rw-r--r--Src/options.c1
-rw-r--r--Src/params.c9
-rw-r--r--Src/parse.c12
-rw-r--r--Src/signals.c159
-rw-r--r--Src/subst.c13
-rw-r--r--Src/utils.c49
-rw-r--r--Src/xmods.conf1
-rw-r--r--Src/zsh.export6
-rw-r--r--Src/zsh.h47
-rw-r--r--Util/zsh-development-guide148
-rw-r--r--configure.in3
100 files changed, 4532 insertions, 1580 deletions
diff --git a/ChangeLog b/ChangeLog
index 8daf08449..fb09a99ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,293 @@
+1999-06-25 Peter Stephenson <pws@ibmth.difi.unipi.it>
+
+ * pws: 6857: Completion/Core/compinit,
+ Completion/Core/compinstall, Doc/Zsh/compsys.yo: compinit and
+ compinstall are now functions which unfunction and autoload
+ themselves. _compdir is used by compinstall to record where
+ it found the completion directories. compinit is now otherwise
+ stuck with fpath.
+
+ * pws: 6851, 6853: typeset -g doesn't locallize parameters; bug
+ that unset parameters were recreated global instead of at
+ some higher local level; handle PM_AUTOLOAD consistent with other
+ flags.
+
+ * Sven: 6850: Src/init.c: always generate a new pgrp for the
+ shell, since the parent (e.g. xterm) may not have done that
+ and zsh now runs programs in its own pgrp.
+
+ * Sven: 6848: Src/exec.c: don't suspend if the shell is the
+ only thing to suspend (or something like that).
+
+ * Sven: 6841: Src/loop.c: %_ in else branches for PS4
+
+1999-06-24 Peter Stephenson <pws@ibmth.difi.unipi.it>
+
+ * pws: 6834: Src/glob.c, Src/hashtable.c: dyncat() changed always
+ to use heap memory (as it erroneously claimed); hashtable element
+ tablename (used for debugging) freed.
+
+ * Bart: 6830: Src/params.c: don't create the hashtable for an
+ assoc array on assignment unless there is something to put in it.
+
+ * Sven: 6825: Src/Zle_tricky.c: make sure path prefix and suffix
+ are quoted in filename completion; recalculate length of match
+ string.
+
+ * Sven: 6824: Src/exec.c, Src/signals.c: functions got deleted
+ from the process table too early for job control.
+
+ * pws: 6823: Src/exec.c, Src/utils.c: names and line numbers
+ of functions printed for errors during execution.
+
+ * Sven: 6822: Src/Zle/complist.c, Src/Zle/zle_tricky.c: assorted
+ completion fixes: crash with old completion; too many spaces
+ with menu inserting; too many beeps with LISTBEEP.
+
+ * Sven: 6819: Src/exec.c, Src/jobs.c, Src/signals.c: Run
+ jobs inside shell constructs in the same process group as the
+ shell itself.
+
+ * Sven: 6817: Src/Zle/comp.h, Src/Zle/complist.c,
+ Src/Zle/zle_tricky.c: Change ZLS_SELECT to SELECTMIN;
+ don't automatically switch on select widget until there are
+ $SELECTMIN choices.
+
+1999-06-23 Peter Stephenson <pws@ibmth.difi.unipi.it>
+
+ * pws: 6816: Doc/Zsh/params.yo, Src/utils.c: ZBEEP parameter
+ gives string to output instead of beeping.
+
+ * Sven: 6815: Src/Zle/complist.c: switch off menu-select for
+ hidden matches.
+
+ * pws: 6814: Doc/Zsh/mod_zle.yo, Doc/Zsh/options.yo,
+ Doc/Zsh/zle.yo, Src/Zle/deltochar.c, Src/Zle/iwidgets.list,
+ Src/Zle/zle_hist.c, Src/Zle/zle_main.c, Src/Zle/zle_misc.c,
+ Src/Zle/zle_move.c, Src/Zle/zle_thingy.c, Src/Zle/zle_tricky.c,
+ Src/Zle/zle_utils.c, Src/Zle/zle_vi.c, Src/Zle/zle_word.c:
+ Zle determines whether to feep by the return status (except
+ for some inner code loops); completion widgets return 1 if
+ something failed in the hierarchy outside the widget function;
+ the -n and -N options work properly.
+
+ * pws: 6812: Src/subst.c: ${(AA)foo=}, or anything that gives
+ a null string after the =, creates an empty assoc array.
+
+ * pws: 6806: Completion/Core/compdump, Completion/Core/compinit,
+ Completion/Core/compinstall, Doc/Zsh/compsys.yo: compdump is now
+ a function which unfunctions itself; default dumpfile location
+ is now ${ZDOTDIR:-$HOME}/.zcompdump
+
+ * Sven: 6807: Src/Zle/complist.c: accept-and-menu-complete
+ advances the menu-select selection too.
+
+ * Sven: 6802: Src/Zle/complist.c: change some default colours
+
+ * pws: 6801: Doc/Zsh/builtins.yo, Src/builtin.c: Make emulate -L
+ turn on LOCAL_TRAPS, too.
+
+ * Sven: 6796: Src/Zle/zle_main.c, Src/Zle/zle_thingy.c,
+ Doc/Zsh/mod_zle.yo, Completion/Core/compinit: zle -la lists
+ all widgets, just the name; zle -la <NAME> tests if <NAME> is
+ defined.
+
+ * Sven: 6793: Src/Zle/complist.c, Src/Zle/zle_keymap.c,
+ Src/Zle/zle_main.c, Doc/Zsh/mod_complist.yo: Local keymaps can be
+ defined, currently only used with menu-select.
+
+1999-06-22 Peter Stephenson <pws@ibmth.difi.unipi.it>
+
+ * Sven: 6786: Src/Zle/zle_tricky.c, Doc/Zsh/compctl.yo: only use
+ a range when you are after the first pattern in it.
+
+ * Sven: 6780: Src/Zle/complist.c: wasn't showinglist when it
+ thought it was.
+
+ * Sven: 6778: don't delete function from job tables
+
+ * pws: 6776: Doc/Makefile.in, Doc/Zsh/compsys.yo,
+ Doc/Zsh/mod_complist.yo: Tweakchen for menu-select patch;
+ also (unposted) changed name collist to complist wherever it
+ occurs.
+
+ * Sven: 6774, 6775: Src/Zle/collist.c, Src/Zle/comp.h,
+ Src/Zle/zle.h, Src/Zle/zle_main.c, Src/Zle/zle_tricky.c,
+ Doc/Zsh/compsys.yo, Doc/Zsh/mod_collist.yo,
+ Doc/Zsh/mod_compctl.yo, Doc/Zsh/mod_deltochar.yo,
+ Doc/Zsh/modules.yo, Completion/Core/_path_files: Improvements
+ for menu-select widget; ZLS_SELECT turns menu-completion
+ into menu-selection; key bindings more natural; highlighting
+ more useful
+
+ * Oliver: 6772: Src/Zle/zle_tricky.c: use the whole
+ command text for job completion.
+
+1999-06-21 Peter Stephenson <pws@ibmth.difi.unipi.it>
+
+ * Sven: 6760: Src/Zle/zle_tricky.c: menucompletion displaying new
+ list of matches sometimes got confused.
+
+ * Sven: 6755: Src/jobs.c: status of restarted job including
+ current shell processes was wrong.
+
+ * Sven: 6753: Src/Zle/collist.c, Src/xmods.conf:
+ load collist
+
+ * Sven: 6747: Src/Zle/collist.c, Src/Zle/zle_main.c,
+ Src/Zle/zle_tricky.c: menu-select allows you to move
+ cursor to select completions; uses ma list colouring
+ capability.
+
+ * Sven: 6742: Src/Zle/collist.c, Src/Zle/collist.mdd,
+ Src/Zle/zle_main.c, Src/Zle/zle_tricky.c, Src/module.c,
+ Src/zsh.h, Doc/Zsh/mod_collist.yo, Doc/Zsh/mod_compctly.yo,
+ Doc/Zsh/mod_deltochar.yo, Doc/Zsh/modules.yo,
+ Util/zsh-development-guide: collist module: colour completion
+ lists by setting ZLS_COLOURS (or even ZLS_COLORS) variables.
+
+ * pws: 6737: Doc/Zsh/builtins.yo, Doc/Zsh/zle.yo: simplifications
+ suggested by Bart.
+
+ * Bart: 6732: Doc/Zsh/compsys.yo: restore missing bits of Sven's
+ patches (not the zle_tricky.c hunk).
+
+ * Bart: 6731: Doc/Zsh/compctl.yo: spelling correction
+
+1999-06-20 Peter Stephenson <pws@ibmth.difi.unipi.it>
+
+ * zsh-3.1.5-pws-23 made available
+
+ * Sven/pws: 6616, 6609, 6726 (merged): `zle [ -N ] [ -n num ]
+ widget args'; internal widgets handle arguments and return
+ values; search commands use arguments; read -[kq] can use
+ zle's key mechanism; zle -R [msg] redisplays line editor;
+ digit-argument feeps if the keypress wasn't a digit;
+ universal-argument handles argument as numeric.
+
+ * pws: 6725: Src/signals.c: more local traps: now don't add trap
+ to list to restore when outside a function, but do if the function
+ simply unsets a trap which was set outside.
+
+1999-06-18 Peter Stephenson <pws@ibmth.difi.unipi.it>
+
+ * pws: 6718: Completion/Core/compinit, Completion/Core/compdump,
+ Doc/Zsh/compsys.yo: rebind existing completion widgets for new
+ completion instead of defining new ones.
+
+ * pws: 6717: Doc/Zsh/options.yo, Src/exec.c, Src/options.c,
+ Src/signals.c, Src/zsh.h: Option LOCAL_TRAPS saves and restores
+ traps on exit from functions; set for ksh emulation.
+
+ * Tanaka Akira: 6716: Completion/User/_chown: some systems use `:'
+ as separator in chown.
+
+ * Oliver/Sven: 6709, 6710: Completion files Base/_subscript,
+ User/_chown, User/_groups, User/_x_options: _subscript shows
+ listing for ordinary arrays; new chown and chgrp completions;
+ example _x_options can complete displays.
+
+ * Sven: 6707: Src/exec.c: Shell structures not at the end
+ of a pipeline are suspendable. This is the only way
+ of stopping a command in such a structure where the command
+ handles interruptions in such a way that zsh doesn't see them.
+
+1999-06-17 Peter Stephenson <pws@ibmth.difi.unipi.it>
+
+ * pws: 6705: Doc/Zsh/builtins.yo, Src/builtin.c, Src/exec.c,
+ Src/init.c, Src/input.c, Src/parse.c: some more LINENO
+ subtleties: embedded function definitions have correct line
+ number; all lines, not just ones with new PS1, are counted
+ interactively; traps with trap builtin use line no. of
+ surrounding environment.
+
+ * Sven: 6693: Src/Modules/parameter.c, Src/builtin.c, Src/exec.c,
+ Src/input.c, Src/zsh.h: update LINENO properly when parsing a
+ string.
+
+ * Sven: 6692: Src/Zle/comp.h, Src/Zle/compctl.c,
+ Src/Zle/zle_tricky.c, Doc/Zsh/compwid.yo,
+ Completion/Builtins/_kill, Completion/Builtins/_wait,
+ Completion/User/_gdb: allow the -y option to compadd for
+ specifying an array to use when listing.
+
+ * Sven: 6689: Src/Zle/zle_tricky.c, Completion/Base/_subscript:
+ test for closing bracket in get_comp_string().
+
+ * Oliver: 6688: Zsh/compsys.yo, Zsh/func.yo, Zsh/mod_zle.yo,
+ Zsh/params.yo, Zsh/zftpsys.yo: spelling changes.
+
+ * Wayne: 6682: Src/hist.c: Uniquified history commands are limited
+ to size $SAVEHIST, so that the last $((HISTSIZE-SAVEHIST))
+ commands are always available even with HIST_EXPIRE_DUPS_FIRST.
+
+ * Sven: 6686: Completion/Core/_match, Completion/Core/_path_files,
+ Doc/Zsh/compsys.yo: New configuration keys path_cursor,
+ match_insert.
+
+ * Sven: 6685: Src/Zle/compctl.c, Src/Zle/zle_params.c,
+ Doc/Zsh/zle.yo, Completion/Base/_first,
+ Completion/Commands/_correct_filename,
+ Completion/Commands/_most_recent_file,
+ Completion/Core/_approximate, Completion/Core/_expand,
+ Completion/Core/_list: NUMERIC is unset if no prefix was given;
+ it may be unset explicitly, and if set again will be restored in
+ the expected way.
+
+ * Wayne: 6683: Src/exec.c: ambiguous brace
+
+ * Wayne: 6681: Src/builtin.c: start-of-loop check for history -r
+ was wrong.
+
+1999-06-16 Peter Stephenson <pws@ibmth.difi.unipi.it>
+
+ * pws: 6679: Src/Zle/zle_thingy.c, Doc/Zsh/compwid.yo: always
+ use .complete-word etc. as widget type in zle -C.
+
+ * pws: 6677: Doc/Zsh/guide.yo: avoid TeX overfull hbox problem.
+
+ * Andrej: 6674: Doc/zsh.yo, Doc/ztexi.yo: change order of initial
+ formatting instructions to make interaction with system
+ configuration files better.
+
+ * pws: 6660: Doc/Zsh/compctl.yo: pointer to new completion system
+ at top of compctl documentation.
+
+ * pws: 6659: Src/Zle/zle_tricky.c: a couple of NULL's should be 0's
+
+ * pws: 6658: Doc/Zsh/options.yo, Src/init.c: options strings at
+ shell startup can end with whitespace (for #!), but anything
+ after the whitespace causes an error.
+
+ * Sven: 6657: Completion files Base/_subscript,
+ Builtins/_autoload, Builtins/_bindkey, Builtins/_echotc,
+ Builtins/_kill, Builtins/_limits, Builtins/_wait,
+ Builtins/_zmodload, User/_dd, User/_find, User/_gdb, User/_make,
+ User/_mh, User/_rlogin, User/_x_options: New gdb completion;
+ improved make completion; use compadd in preference to compgen
+ -[sk]; configuration keys ps_args, ps_listsargs.
+
+ * Sven: 6654: Src/Zle/zle_tricky.c: empty display list after -y.
+
+ * Bart: 6652: Src/exec.c: trailing spaces confused #! emulation.
+
+ * Sven: 6649: Src/Zle/zle_tricky.c: behaviour of compctl -l.
+
+ * Bart: 6646: Src/lex.c: extra braces to enhance beauty of code
+ which appeared in 3.0.5.
+
1999-06-15 Peter Stephenson <pws@ibmth.difi.unipi.it>
+ * Tanaka Akira: 6642: Completion/Base/_tilde: complete directory
+ stack elements after ~+ or ~-.
+
+ * Tanaka Akira: 6641: Src/subst.c: treat ~-0 like ~0
+
+ * pws: 6639: configure.in: don't try type of $enable_val if empty
+ (needed when off_t/ino_t are 64-bit without explicit enabling).
+
+ * zsh-3.1.5-pws-22 made available
+
* Oliver: 6636: Completion/Builtins/_limits: wasn't working
* Bart: 6617 + minor changes: Src/utils.c: Be more careful keeping
@@ -34,7 +322,7 @@
* Sven: 6614: Src/Zle/zle_tricky.c, Completion/Brace/_brace_parameter:
completion after quotes in parameters
-
+
* pws: 6610: Src/glob.c: globbing flags shouldn't be active
without extendedglob.
diff --git a/Completion/Base/_first b/Completion/Base/_first
index d9e7ee82c..8b4da019d 100644
--- a/Completion/Base/_first
+++ b/Completion/Base/_first
@@ -40,9 +40,9 @@
# PREFIX="$PREFIX[1,-2]"
# # If a numeric prefix is given, we use it as the number of
# # lines (multiplied by ten below) in the history to search.
-# if [[ NUMERIC -gt 1 ]]; then
+# if [[ ${NUMERIC:-1} -gt 1 ]]; then
# max=$NUMERIC
-# NUMERIC=1
+# unset NUMERIC
# else
# # The default is to search the last 100 lines.
# max=10
diff --git a/Completion/Base/_subscript b/Completion/Base/_subscript
index abaabec8c..66d88b00c 100644
--- a/Completion/Base/_subscript
+++ b/Completion/Base/_subscript
@@ -1,7 +1,27 @@
#compdef -subscript-
if [[ ${(Pt)${compstate[parameter]}} = assoc* ]]; then
- compgen -S ']' -k "( ${(kP)${compstate[parameter]}} )"
+ if [[ "$RBUFFER" = \]* ]]; then
+ compadd -S '' - "${(@kP)${compstate[parameter]}}"
+ else
+ compadd -S ']' - "${(@kP)${compstate[parameter]}}"
+ fi
+elif [[ ${(Pt)${compstate[parameter]}} = array* ]]; then
+ local list i j
+
+ ind=( {1..${#${(P)${compstate[parameter]}}}} )
+ list=()
+ for i in "$ind[@]"; do
+ [[ "$i" = ${PREFIX}*${SUFFIX} ]] &&
+ list=( "$list[@]"
+ "${(r:4:: ::):)i} $(print -D ${(P)${compstate[parameter]}[$i]})" )
+ done
+
+ if [[ "$RBUFFER" = \]* ]]; then
+ compadd -S '' -V default -y list - "$ind[@]"
+ else
+ compadd -S ']' -V default -y list - "$ind[@]"
+ fi
else
_compalso -math-
fi
diff --git a/Completion/Base/_tilde b/Completion/Base/_tilde
index c24c65701..d03030821 100644
--- a/Completion/Base/_tilde
+++ b/Completion/Base/_tilde
@@ -7,10 +7,32 @@
# `(( compstate[nmatches] )) || compgen -nu -qS/'
# below that.
+local c s dirs list