about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-10-17 04:52:56 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-10-17 04:52:56 +0000
commit6014bbdb459e30aee0f5ec4a7e0bdfb43a264adf (patch)
treed04738e985ed498621fb5f4930ffd4ce0143ee42
parentbf23cb8fe738c1fcd2c1b8a458f4316a3b782652 (diff)
downloadzsh-6014bbdb459e30aee0f5ec4a7e0bdfb43a264adf.tar.gz
zsh-6014bbdb459e30aee0f5ec4a7e0bdfb43a264adf.tar.xz
zsh-6014bbdb459e30aee0f5ec4a7e0bdfb43a264adf.zip
zsh-3.1.6-bart-7 zsh-3.1.6-bart-7
-rw-r--r--ChangeLog367
-rw-r--r--Completion/Builtins/.distfiles4
-rw-r--r--Completion/Commands/.distfiles3
-rw-r--r--Completion/Commands/_history_complete_word122
-rw-r--r--Completion/Linux/_rpm9
-rw-r--r--Completion/User/.distfiles17
-rw-r--r--Completion/User/_man9
-rw-r--r--Completion/X/.distfiles2
-rw-r--r--Config/version.mk4
-rw-r--r--Doc/Makefile.in6
-rw-r--r--Doc/Zsh/.distfiles6
-rw-r--r--Doc/Zsh/compsys.yo9
-rw-r--r--Doc/Zsh/options.yo8
-rw-r--r--Etc/FAQ.yo26
-rw-r--r--Functions/Misc/.distfiles2
-rw-r--r--Functions/Prompts/.distfiles9
-rw-r--r--Functions/Prompts/prompt_elite2_setup4
-rw-r--r--Misc/.distfiles1
-rw-r--r--Src/Modules/mathfunc.c2
-rw-r--r--Src/Zle/.distfiles1
-rw-r--r--Src/Zle/zle_tricky.c12
-rw-r--r--Src/builtin.c3
-rw-r--r--Src/init.c4
-rw-r--r--Src/main.c3
-rw-r--r--Src/options.c1
-rw-r--r--Src/zsh.h1
26 files changed, 471 insertions, 164 deletions
diff --git a/ChangeLog b/ChangeLog
index 693c981a3..757bc7803 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,367 @@
+1999-10-16  Bart Schaefer  <schaefer@zsh.org>
+
+	* Config/version.mk: Set version string to 3.1.6-bart-7.
+
+	* Completion/User/_whois: Tanaka: 8296: New completion for "whois".
+
+	* Completion/User/_archie: Tanaka: 8295: New completion for "archie".
+
+1999-10-15  Bart Schaefer  <schaefer@zsh.org>
+
+	* Completion/Debian/_apt, Completion/Base/_regex_arguments:
+	Tanaka: 8289: Misc. cleanup.
+
+	* Completion/User/_pbm: Tanaka: 8287: Add missing
+	continuation-line backslashes.
+
+	* Completion/User/_urls: Tanaka: 8286: Misc. cleanup.
+
+	* Misc/bash2zshprompt: Adam: 8278: Emit "setopt promptsubst".
+
+	* Completion/User/_urls: Oliver: 8276: More autoremoval fixes.
+
+	* Src/Zle/zle_tricky.c: Sven: 8283: Fix bug in tracking number of
+	matches added.
+
+	* Doc/Zsh/compctl.yo, Doc/Zsh/compsys.yo, Doc/Zsh/compwid.yo:
+	Sven: 8283: Improve documentation about match-specs.
+
+	* Completion/Core/compinit: Sven: 8273: "compconf -L" sorts its
+	output.
+
+	* Completion/Core/compinit, Src/Zle/computil.c,
+	Src/Zle/computil.mdd, Src/xmods.conf: Sven: 8272: The computil
+	module is now auto-autoloaded; minor bugfix.
+
+	* Doc/Zsh/mod_complist.yo, Doc/Zsh/mod_computil.yo,
+	Doc/Zsh/mod_deltochar.yo, Doc/Zsh/modules.yo: Sven: 8272: Assorted
+	computil documentation.
+
+	* Completion/Base/_describe, Completion/Base/_values: Sven: 8272:
+	Clean-up related to usages of new computil functions.
+
+	* Src/Zle/computil.c, Completion/Base/_arguments: Sven: 8270:
+	Assorted computil debugging.
+
+	* Src/math.c: Sven: 8267: Fix core dump caused by bad error handling.
+
+	* Completion/User/_urls: Tanaka: 8263: Avoid bad autoremove behavior.
+
+	* Completion/User/_killall, Completion/User/_pack,
+	Completion/User/_unpack, Completion/User/_whereis: Oliver: 8262:
+	More new completers.
+
+	* Completion/User/_uncompress, Completion/User/_users,
+	Completion/User/_gzip, Completion/User/_hosts: Oliver: 8262: Fix
+	misc. minor omissions.
+
+	* Completion/Builtins/_nothing: Oliver: 8262: Use this for the
+	"whoami" command.
+
+	* Src/zsh.h, Src/params.c: Sven: 8254: Implement (k) and (K)
+	subscript modifiers.
+
+	* Doc/Zsh/params.yo: Sven: 8254: Document the new (k) and (K)
+	subscript modifiers.
+
+	* Functions/Prompts/prompt_adam2_setup,
+	Functions/Prompts/prompt_fire_setup,
+	Functions/Prompts/prompt_redhat_setup,
+	Functions/Prompts/promptinit: Fix a few bugs, mostly involving
+	`setopt promptsubst'.
+
+	* Functions/Prompts/promptinit: Sven: 8251: Tweak to properly
+	expand the $fpath array.
+
+	* Src/Zle/compctl.c, Src/Zle/compctl.mdd: Sven: 8249: Add the
+	"compmatchers" array.
+
+	* Doc/Zsh/compctl.yo, Doc/Zsh/compsys.yo: Sven: 8249: Clarify
+	documentaion of declarations needed by some completers; document a
+	couple of new features.
+
+	* Completion/Core/_description, Completion/Core/_files,
+	Completion/Core/_main_complete, Completion/Core/_message,
+	Completion/Core/_multi_parts, Completion/Core/_path_files,
+	Completion/Core/_sep_parts: Sven: 8249: Accept standard compadd
+	arguments, fix a few bugs, use the new compconfig[warning_format],
+	etc.
+
+	* Completion/Builtins/_nothing: Sven: 8249: A completer which just
+	prints a warning that the current context does not expect any
+	words at all (e.g., a command that takes no arguments).
+
+1999-10-14  Bart Schaefer  <schaefer@zsh.org>
+
+	* Completion/Core/_main_complete, Completion/Core/compinit: Sven:
+	8256: Missing hunks of 8227.
+
+	* Src/Zle/zle_tricky.c: Sven: 8247: When completing with a match
+	spec, don't insert anchors if there are characters missing to the
+	left of them.
+
+	* Src/Zle/zle_tricky.c: Sven: 8244: Fix failure to list ambiguous
+	matches completing after a quote.
+
+	* configure.in: Tanaka: 8241: Test for a gcc 2.95 bug.
+
+	* Src/Builtins/rlimits.awk, Src/Builtins/rlimits.c,
+	Doc/Zsh/builtins.yo: Zefram: 8229: Support for the AIO_OPS and
+	AIO_MEM resource limits.
+
+1999-10-13  Bart Schaefer  <schaefer@zsh.org>
+
+	* Src/Zle/compctl.c, Src/Zle/computil.c, Src/Zle/computil.mdd,
+	Src/Zle/zle_tricky.c, Doc/Zsh/compsys.yo,
+	Completion/Core/compinit, Completion/Base/_arguments,
+	Completion/Base/_describe, Completion/Base/_values: Sven: 8219:
+	Add and make use of the "computil" module, which moves several of
+	the operations previously done by shell functions into C code.
+
+	* Completion/User/_netscape: Oliver: 8230: Better browser and url
+	completion.
+
+	* Completion/User/_tiff: Sven: 8132: Change "options" to "opt_args".
+
+	* Src/Zle/zle_tricky.c: Sven: 8231: Remove unnecessary tokenization.
+
+	* Src/utils.c: Sven: 8231: Don't attempt to use a null name in
+	zwarnnam().
+
+	* Doc/Zsh/compsys.yo, Completion/X/_xmodmap,
+	Completion/User/_flex, Completion/User/_gcc,
+	Completion/User/_gprof, Completion/User/_gs,
+	Completion/User/_lynx, Completion/User/_mount,
+	Completion/User/_nslookup, Completion/User/_rlogin,
+	Completion/User/_socket, Completion/User/_ssh,
+	Completion/User/_telnet, Completion/User/_urls,
+	Completion/User/_wget, Completion/User/_yp, Completion/Linux/_rpm:
+	Sven: 8231,8232: Rename "options" as "opt_args" in a lot of places
+	to avoid conflicts with the parameters module.
+
+	* Completion/User/_urls, Completion/User/_webbrowser,
+	Doc/Zsh/compsys.yo: Oliver: 8230: Better browser and url
+	completion.
+
+	* Functions/Zle/incremental-complete-word, Doc/Zsh/compsys.yo,
+	Doc/Zsh/compwid.yo, Doc/Zsh/zle.yo, Src/Zle/comp.h,
+	Src/Zle/comp1.c, Src/Zle/compctl.c, Src/Zle/complist.c,
+	Src/Zle/zle_main.c, Src/Zle/zle_params.c, Src/Zle/zle_tricky.c:
+	Sven: 8227: Compute the list of matches more frequently and
+	earlier so that compstate[nmatches] is accurate more often;
+	replace compstate[normal_nmatches] with
+	compstate[alternate_nmatches] as a consequence; add
+	compstate[list_lines] and BUFFERLINES for testing how big a screen
+	is needed to edit; add an array comppostfuncs to hold callback
+	shell functions run during completion; fix a display bug.
+
+	* Src/Zle/zle_tricky.c: Sven: 8222: More cursor position
+	heuristics: prefer to place the cursor in the matched portion of
+	an ambiguous word, rather than in a prefix or suffix.
+
+	* Completion/Core/_approximate, Completion/Core/_complete,
+	Completion/Core/_expand, Completion/Core/_list,
+	Completion/Core/_main_complete, Completion/Core/_match,
+	Completion/Core/_path_files, Completion/Base/_default: Sven: 8217:
+	Remove large comments that are now redundant with the compsys
+	manual; misc other cleanup.
+
+	* Src/Zle/zle_tricky.c: Sven: 8216: Improve code readability.
+
+	* Src/Zle/zle_tricky.c: Sven: 8215: Fix problem with
+	accept-and-menu-complete.
+
+	* Functions/Misc/nslookup: A space is required between "read -k"
+	and the number of bytes to read.
+
+	* Doc/Zsh/builtins.yo: Document vagaries of "read -k" argument
+	parsing.
+
+1999-10-12  Bart Schaefer  <schaefer@zsh.org>
+
+	* config.sub: Handle newer flavors of hppa2.0 as computed by
+	configure.
+
+1999-10-11  Bart Schaefer  <schaefer@zsh.org>
+
+	* Completion/Core/_path_files: Sven: 8206: Fix setting of PREFIX
+	when there's a leading slash.
+
+	* Src/Zle/zle_tricky.c: Sven: 8205: Misc. fixes involving uninit'd
+	variables, ragged alignment of output in calclist(), etc.
+
+	* Completion/User/_yodl: Sven: 8204: Handle .yo file-suffix as
+	well as .yodl.
+
+	* Completion/Builtins/_cd, Completion/Base/_tilde: Oliver: 8181:
+	Clean up directory stack handling.
+
+1999-10-10  Bart Schaefer  <schaefer@zsh.org>
+
+	* Src/options.c: Zefram: 8152: A batch of tweaks to emulation
+	behavior (exec change omitted).
+
+	* Doc/Zsh/options.yo, Src/options.c: Zefram: 8154: Change default
+	behavior of shortloops (extendedglob change omitted).
+
+	* Src/exec.c: Add the coproc descriptors to those that can't be
+	copied by redirection.
+
+	* Doc/Zsh/redirect.yo: Zefram: 8186: More accurate redirection doc.
+
+	* Src/exec.c: Tweak 8187 to test the fdtable[] array rather than
+	simply > 9.
+
+	* Src/glob.c, Src/exec.c: Zefram: 8187: Don't permit redirection
+	to grab zsh's internal descriptors.
+
+	* Doc/Zsh/redirect.yo: Document the "&>" redirection and the use
+	of multi-digit numbers on the RHS of "<&" and ">&" redirections.
+
+	* Src/lex.c: Fix parsing of the "&>" redirection.
+
+	* Src/exec.c: Plug lead of a copy of the coproc input descriptor.
+
+1999-10-07  Bart Schaefer  <schaefer@zsh.org>
+
+	* Completion/User/_urls: Oliver K: 8155: Handle "file:" urls.
+
+	* Src/Zle/zle_tricky.c: Tweak last patch slightly to avoid the
+	possibility of returning NULL.
+
+	* Src/Zle/zle_tricky.c: Don't prematurely free/recreate the cached
+	value of $compstate[ambiguous].
+
+	* Functions/Prompts/promptinit: This function requires extendedglob.
+
+1999-10-06  Bart Schaefer  <schaefer@zsh.org>
+
+	* Functions/Misc/colors:
+	Adam: 8147: Use $'...' rather than $(echo -n '...').
+
+	* Misc/bash2zshprompt: Adam: 8144: Small fix.
+
+	* Misc/bash2zshprompt, Functions/Prompts/prompt_adam1_setup,
+	Functions/Prompts/prompt_adam2_setup,
+	Functions/Prompts/prompt_blue_setup,
+	Functions/Prompts/prompt_combo_setup,
+	Functions/Prompts/prompt_cyan_setup,
+	Functions/Prompts/prompt_elite2_setup,
+	Functions/Prompts/prompt_elite_setup,
+	Functions/Prompts/prompt_fire_setup,
+	Functions/Prompts/prompt_green_setup,
+	Functions/Prompts/prompt_magenta_setup,
+	Functions/Prompts/prompt_off_setup,
+	Functions/Prompts/prompt_red_setup,
+	Functions/Prompts/prompt_redhat_setup,
+	Functions/Prompts/prompt_suse_setup,
+	Functions/Prompts/prompt_white_setup,
+	Functions/Prompts/prompt_yellow_setup,
+	Functions/Prompts/promptinit, Functions/Misc/colors,
+	Completion/User/_prompt: Adam: 8129: "Themed prompts" system
+	copied (and translated) from bash.
+
+	* INSTALL, configure.in: Adam: 8145: Install the themed-prompt stuff.
+
+	* Src/Modules/stat.c, Src/system.h: Zefram: 8137: Support for
+	Solaris "doors".
+
+	* Src/jobs.c: Reattach the tty and resize the terminal after a
+	foreground job is stopped.
+
+1999-10-04  Bart Schaefer  <schaefer@zsh.org>
+
+	* Src/Zle/zle_refresh.c: Geoff: 8126: Fix infinite loop in
+	tc_rightcurs().
+
+1999-10-03  Bart Schaefer  <schaefer@zsh.org>
+
+	* Src/builtin.c, Doc/Zsh/builtins.yo: PWS: 8093: Back out 8084.
+
+	* Src/prompt.c: Use zcalloc() to allocate the buffer in
+	promptexpand(), so as not to leave garbage beyond the end of the
+	prompt after expansion.
+
+	* Src/builtin.c: When computing the new directory for $PWD, don't
+	duplicate a trailing slash.
+
+	* Etc/FAQ.yo: PWS: zsh-announce/100: Latest FAQ changes.
+
+1999-10-02  Bart Schaefer  <schaefer@zsh.org>
+
+	* Src/exec.c: Start the path search over from the beginning, not
+	from where it was last left off, after removing a bad element at
+	attempted-execute-time.
+
+1999-09-30  Bart Schaefer  <schaefer@zsh.org>
+
+	* Doc/Zsh/compsys.yo, Completion/Commands/_bash_completions: PWS:
+	8108: Completions for bash equivalence.
+
+	* Doc/Makefile.in: Adam: 8106: Use $(DESTDIR) when installing
+	info, too.
+
+	* Completion/User/_my_accounts, Completion/User/_other_accounts,
+	Completion/User/_user@host, Completion/User/_user_at_host: Adam:
+	8101: Change @ to _at_ in file names.
+
+	* Completion/User/_perl_modules, Completion/User/_perldoc: Adam:
+	8100: Small bugfix, whitespace cleanup.
+
+	* Completion/Core/compinit, Doc/Zsh/compsys.yo: PWS: 8098: Add
+	"compdef -K" to map multiple widgets to the same function.
+
+	* Doc/Zsh/guide.yo: PWS: 8097: Renamed to manual.yo.
+
+	* Doc/Zsh/guide.yo, Doc/Zsh/intro.yo, Doc/Zsh/manual.yo,
+	Doc/Makefile.in, Doc/zsh.yo, Doc/ztexi.yo: PWS: 8097: Rename
+	"guide" to "manual" as PWS is working on another "guide."
+
+	* Completion/User/_a2ps: Alexandre Duret-Lutz: 8094: Update for
+	newer versions of a2ps.
+
+	* Src/params.c: Don't use tokenized strings as associative array keys.
+
+	* Src/exec.c: PWS: 8086: Don't singsub() the LHS of assignments at
+	exec time.
+
+	* Src/Zle/complist.c: PWS: 8072: Fix allocation state bug (massive
+	reindentation but no other real changes).
+
+	* Doc/Zsh/builtins.yo: PWS: 8084: Reset $PWD in the "pwd" builtin
+	if unable to stat(pwd).  This leaves the dirstack in an
+	inconsistent state and needs more looking-at.
+
+	* Src/exec.c: Be a little smarter about fixing up the command
+	table when we find a bad element at attempted-execute-time.
+
+1999-09-28  Bart Schaefer  <schaefer@zsh.org>
+
+	* Src/builtin.c: PWS: 8084: Reset $PWD in the "pwd" builtin if
+	unable to stat(pwd).  This leaves the dirstack in an inconsistent
+	state and needs more looking-at.
+
+	* Completion/User/_man: Tanaka: 8082: Fix PWS's silly thinko.
+
+1999-09-27  Bart Schaefer  <schaefer@zsh.org>
+
+	* Completion/User/_user@host: Adam: 8065: Add forgotten file used
+	by _my_accounts and _other_accounts.
+
+	* Doc/Zsh/compsys.yo: Adam: 8064: Documentation for _my_accounts
+	and _other_accounts usages.
+
+	* Completion/User/_my_accounts, Completion/User/_other_accounts:
+	Adam: 8064,8065,8066: Assorted fixes and documentation.
+
+	* Completion/User/_man: Adam: 8062: Fix to handle colon-delimited
+	"manpath" output (as corrected by PWS: 8067.)
+
+1999-09-26  Bart Schaefer  <schaefer@zsh.org>
+
+	* Src/signals.c: PWS: 8056: Wrap getiparam() in HEAPALLOC block
+	for math evaluation reasons.
+
 1999-09-26  Peter Stephenson  <pws@ibmth.df.unipi.it>
 
 	* pws: Config/version.mk: 3.1.6-pws-6
@@ -392,6 +756,9 @@
 	  _verbose_list widget makes completion function lists
 	  progressively more verbose.
 
+	* Sven: 7796: _arguments uses describe_values config key; other
+	  misc. fixes.
+
 	* Sven: 7795: Completion/User/_mount: mounting excitement.
 
 	* Sven: 7793: Completion/User/_ispell: ispell completions.
diff --git a/Completion/Builtins/.distfiles b/Completion/Builtins/.distfiles
index 633dc2d01..8fc8fcc6b 100644
--- a/Completion/Builtins/.distfiles
+++ b/Completion/Builtins/.distfiles
@@ -2,6 +2,6 @@ DISTFILES_SRC='
     .distfiles
     _aliases _arrays _autoload _bg_jobs _bindkey _builtin _cd _command
     _compdef _disable _echotc _enable _fc _functions _hash _jobs _kill
-    _limits _sched _set _setopt _source _stat _trap _unhash _unsetopt
-    _vars_eq _wait _which _zftp _zle _zmodload
+    _limits _nothing _sched _set _setopt _source _stat _trap _unhash
+    _unsetopt _vars_eq _wait _which _zftp _zle _zmodload
 '
diff --git a/Completion/Commands/.distfiles b/Completion/Commands/.distfiles
index 74072b5de..9f7b73b49 100644
--- a/Completion/Commands/.distfiles
+++ b/Completion/Commands/.distfiles
@@ -1,4 +1,5 @@
 DISTFILES_SRC='
-    .distfiles _correct_filename _correct_word _expand_word 
+    .distfiles
+    _bash_completions _correct_filename _correct_word _expand_word 
     _history_complete_word _read_comp _most_recent_file _verbose_list
 '
diff --git a/Completion/Commands/_history_complete_word b/Completion/Commands/_history_complete_word
index ecd2471e5..f459046d2 100644
--- a/Completion/Commands/_history_complete_word
+++ b/Completion/Commands/_history_complete_word
@@ -1,107 +1,31 @@
-#compdef -K _history-complete-older complete-word \e/ _history-complete-newer complete-word \e,
-#
-# Complete words from the history
-#
-# by Adam Spiers, with help gratefully received from
-# Sven Wischnowsky and Bart Schaefer
-#
-# Available configuration keys:
-#
-#   history_list -- display lists of available matches
-#   history_stop -- prevent looping at beginning and end of matches
-#                   during menu-completion
-#   history_sort -- sort matches lexically (default is to sort by age)
-#   history_remove_all_dups --
-#                   remove /all/ duplicate matches rather than just
-#                   consecutives
-#
+#compdef -k complete-word \e/
 
-_history_complete_word () {
-  local expl direction
+local expl
 
-  if [[ $WIDGET = *newer ]]; then
-    direction=older
+if [[ -n "$compstate[old_list]" && -n "$compconfig[history_stop]" ]]; then
+  if [[ -z "$_hist_menu_end" &&
+        compstate[old_insert] -lt _hist_menu_length ]]; then
+    compstate[old_list]=keep
+    compstate[insert]=$((compstate[old_insert]+1))
   else
-    direction=newer
-  fi
-
-  [[ -z "$compconfig[history_list]" ]] && compstate[list]=''
-
-  if [[ -n "$compstate[old_list]" &&
-    ( -n "$compconfig[history_stop]" || "$compstate[insert]" = menu ) ]]; then
-    # array of matches is newest -> oldest (reverse of history order)
-    if [[ "$direction" == 'older' ]]; then
-      if [[ compstate[old_insert] -eq $_hist_menu_length ||
-            "$_hist_stop" == 'oldest' ]]; then
-        _hist_stop='oldest'
-        [[ "$compconfig[history_stop]" = verbose ]] &&
-          _message 'beginning of history reached'
-      elif [[ "$_hist_stop" == 'newest' ]]; then
-        zle -Rc
-        _history_complete_word_gen_matches
-      else
-        compstate[old_list]=keep
-        (( compstate[insert] = compstate[old_insert] + 1 ))
-      fi
-    elif [[ "$direction" == 'newer' ]]; then
-      if [[ compstate[old_insert] -eq 1 || "$_hist_stop" == 'newest' ]]; then
-        _hist_stop='newest'
-        [[ "$compconfig[history_stop]" = verbose ]] &&
-          _message 'end of history reached'
-      elif [[ "$_hist_stop" == 'oldest' ]]; then
-        zle -Rc
-        _history_complete_word_gen_matches
-      else
-        compstate[old_list]=keep
-        (( compstate[insert] = compstate[old_insert] - 1 ))
-      fi
-    fi
-  else
-    _hist_stop=''
-    _hist_old_prefix="$PREFIX"
-    _history_complete_word_gen_matches
-  fi
-
-  [[ -n "$compstate[nmatches]" ]]
-}
-
-_history_complete_word_gen_matches () {
-  if [[ -n "$compconfig[history_list]" ]]; then
-    if [[ -n "$compconfig[history_sort]" ]]; then
-      _description expl 'history word'
-    else
-      _description -V expl 'history word'
-    fi
-  else
-    if [[ -n "$compconfig[history_sort]" ]]; then
-      expl=()
+    _hist_menu_end=yes
+    if [[ "$compconfig[history_stop]" = verbose ]]; then
+      _message 'end of history reached'
     else
-      expl=('-V' '')
+      compstate[old_list]=keep
+      compstate[insert]=_hist_menu_length
     fi
   fi
-
-  [[ -n "$_hist_stop" ]] && PREFIX="$_hist_old_prefix"
-
-  local rem_dups
-  if [[ -n "$compconfig[history_remove_all_dups]" ]]; then
-    rem_dups=''
+else
+  if [[ -n "$compconfig[history_sort]" ]]; then
+    _description expl 'history word'
   else
-    rem_dups='-1'
+    _description -V expl 'history word'
   fi
-
-  compgen "$expl[@]" $rem_dups -Q -H 0 ''
-  _hist_menu_length="$compstate[nmatches]"
-
-  case "$direction" in 
-    newer)  compstate[insert]=$_hist_menu_length
-	    [[ -n "$_hist_stop" ]] && (( compstate[insert]-- ))
-            ;;
-    older)  compstate[insert]=1
-	    [[ -n "$_hist_stop" ]] && (( compstate[insert]++ ))
-            ;;
-  esac
-
-  [[ -n "$_hist_stop" ]] && _hist_stop=''
-}
-
-_history_complete_word "$@"
+  compgen "$expl[@]" -Q -H 0 ''
+  if [[ -n "$compconfig[history_stop]" ]]; then
+    compstate[insert]=1
+    _hist_menu_length="$compstate[nmatches]"
+    _hist_menu_end=''
+  fi
+fi
diff --git a/Completion/Linux/_rpm b/Completion/Linux/_rpm
index a09d16587..f54f77522 100644
--- a/Completion/Linux/_rpm
+++ b/Completion/Linux/_rpm
@@ -148,7 +148,7 @@ while [[ -n "$state" ]]; do
       '*:RPM package:->package' && ret=0
     ;;
   build_b)
-    tmp=( '*:spec file:_files -g \*.spec' )
+    tmp=( '*:spec file:_path_files -/ -g \*.spec' )
     ;&
   build_t)
     (( $#tmp )) || tmp=( '*:tar file:_files -g \*.\(\#i\)tar\(.\*\|\)' )
@@ -188,17 +188,14 @@ while [[ -n "$state" ]]; do
     ;&
   package)
     _description expl 'RPM package'
-    if (( ! $+installed_rpms )); then
-      installed_rpms=( $(rpm -qa) )
-    fi
-    compadd "$expl[@]" -M 'r:|-=* r:|=*' - $installed_rpms && ret=0
+    compadd "$expl[@]" -M 'r:|-=* r:|=*' - $(rpm -qa) && ret=0
     ;;
   package_file)
     if compset -P ftp://; then
       _hosts -S/ && ret=0
     else
       _description expl 'RPM package file'
-      _files "$expl[@]" -g '*.(#i)rpm' && ret=0
+      _path_files "$expl[@]" -/ -g '*.(#i)rpm' && ret=0
       _description expl 'ftp URL prefix'
       compadd "$expl[@]" ftp://
     fi
diff --git a/Completion/User/.distfiles b/Completion/User/.distfiles
index 35dfd2f3d..1f97d30df 100644
--- a/Completion/User/.distfiles
+++ b/Completion/User/.distfiles
@@ -1,11 +1,12 @@
 DISTFILES_SRC='
     .distfiles
-    _a2ps _bison _bunzip2 _bzip2 _chown _compress _configure _cvs _dd
-    _dir_list _dirs _dvi _find _flex _gcc _gdb _gprof _groups _gs _gunzip
-    _gv _gzip _hosts _ispell _lynx _mailboxes _make _man _mh _mount _mutt
-    _my_accounts _nslookup _other_accounts _patch _pbm _pdf _perl_basepods
-    _perl_builtin_funcs _perl_modules _perldoc _ports _ps _pspdf _rcs
-    _rlogin _sh _socket _ssh _strip _stty _su _tar _tar_archive _telnet
-    _tex _tiff _uncompress _urls _use_lo _users _users_on _webbrowser _wget
-    _xargs _yodl _yp
+    _a2ps _archie _bison _bunzip2 _bzip2 _chown _compress _configure _cvs
+    _dd _dir_list _dirs _dvi _find _flex _gcc _gdb _gprof _groups _gs
+    _gunzip _gv _gzip _hosts _ispell _killall _lynx _mailboxes _make _man
+    _mh _mount _mutt _my_accounts _netscape _nslookup _other_accounts
+    _pack _patch _pbm _pdf _perl_basepods _perl_builtin_funcs
+    _perl_modules _perldoc _ports _prompt _ps _pspdf _rcs _rlogin _sh
+    _socket _ssh _strip _stty _su _tar _tar_archive _telnet _tex _tiff
+    _uncompress _unpack _urls _use_lo _user_at_host _users _users_on
+    _webbrowser _wget _whereis _whois _xargs _yodl _yp
 '
diff --git a/Completion/User/_man b/Completion/User/_man
index 0c148a518..fd5702227 100644
--- a/Completion/User/_man
+++ b/Completion/User/_man
@@ -14,7 +14,14 @@ if [[ -n $_comp_correct ]]; then
   approx="(#a${_comp_correct})"
 fi
 
-(( $#manpath )) || manpath=( ${(s.:.)$(manpath 2>/dev/null)} ) ||
+if (( ! $#manpath )); then
+  local mp
+  mp=($(manpath 2>/dev/null))
+  [[ "$mp" == *:* ]] && mp=( ${(s.:.)mp} )
+  manpath=( $mp )
+fi
+
+(( $#manpath )) ||
   manpath=( /usr/man(-/N) /(opt|usr)/(dt|share|X11R6|local)/(cat|)man(-/N) )
 
 # `sman' is the SGML manual directory for Solaris 7.
diff --git a/Completion/X/.distfiles b/Completion/X/.distfiles
index af825329f..475bba785 100644
--- a/Completion/X/.distfiles
+++ b/Completion/X/.distfiles
@@ -2,6 +2,6 @@ DISTFILES_SRC='
     .distfiles
     _x_arguments _x_borderwidth _x_color _x_cursor _x_display _x_extension
     _x_font _x_geometry _x_keysym _x_locale _x_modifier _x_name _x_resource
-    _x_selection_timeout _x_title _x_window _xdvi _xfig _xmodmap
+    _x_selection_timeout _x_title _x_window _xdvi _xfig _xmodmap _xrdb
     _xt_arguments _xt_session_id _xterm _xutils _xv
 '
diff --git a/Config/version.mk b/Config/version.mk
index db81bf927..bd8d4224e 100644
--- a/Config/version.mk
+++ b/Config/version.mk
@@ -27,5 +27,5 @@
 # This must also serve as a shell script, so do not add spaces around the
 # `=' signs.
 
-VERSION=3.1.6-pws-6
-VERSION_DATE='September 26, 1999'
+VERSION=3.1.6-bart-7
+VERSION_DATE='October 16, 1999'
diff --git a/Doc/Makefile.in b/Doc/Makefile.in
index 03ef6bbc0..6bf0c1cb2 100644
--- a/Doc/Makefile.in
+++ b/Doc/Makefile.in
@@ -81,10 +81,11 @@ zsh.texi: zsh.yo
 	test -f $(sdir)/zsh.texi
 
 .yo.1:
-	case $@ in \
+	@case $@ in \
 	  */*) target=$@ ;; \
 	  *) target=$(sdir)/$@ ;; \
 	esac; \
+	$(YODL) -o $$target -I$(sdir) -w zman.yo version.yo $< ; \
 	$(YODL) -I$(sdir) -w zman.yo version.yo $< | sed -e '1s/\\-/-/g' -e '/^\.'\''/d' > $$target || exit 1; \
 	test -f $$target
 
@@ -98,10 +99,11 @@ zsh_toc.html: zsh.texi
 	$(TEXI2HTML) $(sdir)/zsh.texi
 
 zshall.1: zsh.yo
-	case $@ in \
+	@case $@ in \
 	  */*) target=$@ ;; \
 	  *) target=$(sdir)/$@ ;; \
 	esac; \
+	echo $(YODL) -o $$target -I$(sdir) -DZSHALL -w zman.yo version.yo zsh.yo; \
 	$(YODL) -I$(sdir) -DZSHALL -w zman.yo version.yo zsh.yo | sed -e '1s/\\-/-/g' -e '/^\.'\''/d' > $$target || exit 1; \
 	test -f $$target
 
diff --git a/Doc/Zsh/.distfiles b/Doc/Zsh/.distfiles
index f534e834a..6c0938dd6 100644
--- a/Doc/Zsh/.distfiles
+++ b/Doc/Zsh/.distfiles
@@ -2,9 +2,9 @@ DISTFILES_SRC='
     .distfiles
     arith.yo builtins.yo compat.yo compctl.yo compsys.yo compwid.yo
     cond.yo exec.yo expn.yo filelist.yo files.yo func.yo grammar.yo
-    guide.yo index.yo intro.yo invoke.yo jobs.yo metafaq.yo
-    mod_cap.yo mod_clone.yo mod_comp1.yo mod_complist.yo
-    mod_compctl.yo mod_deltochar.yo mod_example.yo mod_files.yo
+    index.yo intro.yo invoke.yo jobs.yo manual.yo metafaq.yo
+    mod_cap.yo mod_clone.yo mod_comp1.yo mod_compctl.yo mod_complist.yo
+    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
     modules.yo options.yo params.yo 
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index fc8d70ff8..f57416e3a 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -1716,15 +1716,6 @@ This is used by functions that complete color names. It should be set
 to the pathname of a file containing color names in the format of an
 X11 tt(rgb.txt) file.
 )
-item(tt(history_list))(
-If this is set to a non-empty string, the tt(_history_complete_word)
-bindable command will list all available matches.
-)
-item(tt(history_remove_all_dups))(
-If this is set to a non-empty string, the tt(_history_complete_word)
-bindable command will remove all duplicate matches, rather than just
-removing consecutive duplicates.
-)
 item(tt(history_sort))(
 If this is set to a non-empty string, completion functions that
 generate words from the history as possible matches sort these words
diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo
index 8892cfb8d..8d10bdbb3 100644
--- a/Doc/Zsh/options.yo
+++ b/Doc/Zsh/options.yo
@@ -1003,14 +1003,6 @@ has been executed.  This also makes the shell non-interactive, unless the
 tt(INTERACTIVE) option is explicitly set on the command line.
 The value of this option cannot be changed anywhere other than the command line.
 )
-pindex(SH_JOB_CONTROL)
-cindex(exiting, checking jobs when)
-cindex(logging out, checking jobs when)
-item(tt(SH_JOB_CONTROL) <C> <K> <S>)(
-Don't report the status of background and suspended jobs when exiting a
-shell with job control.  This is best used in combination with tt(NO_HUP),
-else such jobs will be killed automatically.
-)
 pindex(SINGLE_LINE_ZLE)
 cindex(editor, single line mode)
 item(tt(SINGLE_LINE_ZLE) (tt(-M)) <K>)(
diff --git a/Etc/FAQ.yo b/Etc/FAQ.yo
index ba85615df..b564a6687 100644
--- a/Etc/FAQ.yo
+++ b/Etc/FAQ.yo
@@ -49,7 +49,7 @@ description(\
 mydit(Archive-Name:) unix-faq/shell/zsh
 mydit(Last-Modified:) 1999/07/30
 mydit(Submitted-By:) email(pws@ibmth.df.unipi.it (Peter Stephenson))
-mydit(Version:) $Id: FAQ.yo,v 1.1.1.10 1999/09/22 12:36:12 akr Exp $
+mydit(Version:) $Id: FAQ.yo,v 1.1.1.11 1999/10/17 04:53:07 akr Exp $
 mydit(Posting-Frequency:) Monthly
 mydit(Copyright:) (C) P.W. Stephenson, 1995--1999 (see end of document)
 )
@@ -275,8 +275,7 @@ sect(On what machines will it run?)
   appreciated if you could add any necessary preprocessor code and
   alter configure.in and acconfig.h to configure zsh automatically,
   then send the required context diffs to the list (see question
-  link(5.2)(52)).  Changes based on version 2.5 are very unlikely to
-  be useful.
+  link(5.2)(52)).  Please make sure you have the latest version first.
 
   To get it to work, retrieve the source distribution (see question
   link(1.6)(16)), un-gzip it, un-tar it and read the INSTALL file in the top
@@ -638,7 +637,7 @@ link(2.3)(23).
     it() Traps and signals:
   itemize(
     it()* Traps are not local to functions.  The option LOCAL_TRAPS is
-          be available from 3.1.6.
+          available from 3.1.6.
     it()  TRAPERR has become TRAPZERR (this was forced by UNICOS which
         has SIGERR).
   )
@@ -787,7 +786,7 @@ label(23)
      \!:1-4        $*[1,4]
      \!:1-         $*[1,$#-1]      (or $*[1,-2])
      \!^-          $*[1,$#-1]
-     \!*:q         "$@"            ($*:q doesn't work (yet))
+     \!*:q         "$@"
      \!*:x         $=*             ($*:x doesn't work (yet))
         )
 
@@ -1319,9 +1318,9 @@ sect(How does base arithmetic work?)
   )
   or even
   verb(
-    foo=$[16#ff]
+    foo=$((16#ff))
   )
-  (note that `foo=$((16#ff))' is now supported).  The original syntax was
+  The original syntax was
   verb(
     (( foo = [16]ff ))
   )
@@ -1608,6 +1607,16 @@ a short introduction.  There is a set of example completions supplied
 with the source in Misc/compctl-examples; completion definitions for
 many of the most obvious commands can be found there.
 
+If this confuses you, you may like to know that there is a new, more
+elegant completion system which appeared in version 3.1.6.  This is based
+on functions called automatically for completion in particular contexts
+(for example, there is a function called tt(_cd) to handle completion for
+the tt(cd) command) and is installed automatically with the shell, so all
+you need to do, in principal, is to arrange for this to be loaded.  Putting
+`tt(autoload -U compinit; compinit)' in your tt(.zshrc) should be enough if
+the system is installed properly.  The rest of this section talks about the
+old completion system.
+
 sect(What is completion?)
 
   `Completion' is where you hit a particular command key (TAB is the
@@ -1965,7 +1974,8 @@ this applies
      mytt(\M-p) use tt(history-beginning-search-{forward,backward}) which
      search for a line with the same prefix up to the cursor position.
      From 3.1.6, there is a different implementation which makes this
-     closer (though not identical) to the old behaviour. The story for the
+     closer (though not identical) to the old behaviour, and the
+     traditional bindings have been restored.. The story for the 
      tt({up,down}-line-or-search) commands is similar.
   it() In vi insert mode, the cursor keys no longer work.  The following
      will bind them:
diff --git a/Functions/Misc/.distfiles b/Functions/Misc/.distfiles
index 6e481e916..e4ae3940b 100644
--- a/Functions/Misc/.distfiles
+++ b/Functions/Misc/.distfiles
@@ -1,6 +1,6 @@
 DISTFILES_SRC='
     .distfiles
-    acx allopt cat cdmatch cdmatch2 checkmail cx harden mere multicomp
+    acx allopt cat cdmatch cdmatch2 checkmail colors cx harden mere multicomp
     nslookup proto pushd randline run-help yp yu zed zless zls
 '
 
diff --git a/Functions/Prompts/.distfiles b/Functions/Prompts/.distfiles
new file mode 100644
index 000000000..81b4f2c07
--- /dev/null
+++ b/Functions/Prompts/.distfiles
@@ -0,0 +1,9 @@
+DISTFILES_SRC='
+    .distfiles
+    prompt_elite2_setup prompt_red_setup prompt_adam1_setup
+    prompt_elite_setup prompt_redhat_setup prompt_adam2_setup
+    prompt_fire_setup prompt_suse_setup prompt_blue_setup
+    prompt_green_setup prompt_white_setup prompt_combo_setup
+    prompt_magenta_setup prompt_yellow_setup prompt_cyan_setup
+    prompt_off_setup promptinit
+'
diff --git a/Functions/Prompts/prompt_elite2_setup b/Functions/Prompts/prompt_elite2_setup
index c6bb0b076..58a151e9c 100644
--- a/Functions/Prompts/prompt_elite2_setup
+++ b/Functions/Prompts/prompt_elite2_setup
@@ -7,8 +7,8 @@ prompt_elite2_setup () {
   local COLOR2="%{$bold_color$fg_cyan%}"
   local COLOR3="%{$bold_color$fg_grey%}"
   local COLOR4="%{$reset_color%}"
-  PS1="$COLOR3レ$COLOR1ト$COLOR2($COLOR1%n$COLOR3@$COLOR1%m$COLOR2)$COLOR1ト$COLOR2($COLOR1%!$COLOR3/$COLOR1$GRAD1$COLOR2)$COLOR1ト$COLOR2($COLOR1%D{%I:%M%P}$COLOR3:$COLOR1%D{%m/%d/%y}$COLOR2)$COLOR1ト$COLOR3-$COLOR4$prompt_newline$COLOR3タ$COLOR1ト$COLOR2($COLOR1%#$COLOR3:$COLOR1%~$COLOR2)$COLOR1ト$COLOR3-$COLOR4 " 
-  PS2="$COLOR2ト$COLOR1ト$COLOR3-$COLOR4 "
+  PS1="$COLOR3レ$COLOR1ト$COLOR2($COLOR1%n$COLOR3@$COLOR1%m$COLOR2)$COLOR1ト$COLOR2($COLOR1%!$COLOR3/$COLOR1$GRAD1$COLOR2)$COLOR1ト$COLOR2($COLOR1%D{%I:%M%P}$COLOR3:$COLOR1%D{%m/%d/%y}$COLOR2)$COLOR1ト$COLOR3-$COLOR4$prompt_newline$COLOR3タ$COLOR1ト$COLOR2($COLOR1%#$COLOR3:$COLOR1%~$COLOR2)$COLOR1ト$COLOR3-$COLOR4 " 
+  PS2="$COLOR2ト$COLOR1ト$COLOR3-$COLOR4 "
 
   precmd () { }
   preexec () { }
diff --git a/Misc/.distfiles b/Misc/.distfiles
index a02c324d6..37f0d0d7c 100644
--- a/Misc/.distfiles
+++ b/Misc/.distfiles
@@ -1,5 +1,6 @@
 DISTFILES_SRC='
     .distfiles
+    bash2zshprompt
     c2z compctl-examples globtests globtests.ksh
     job-control-tests lete2ctl
 '
diff --git a/Src/Modules/mathfunc.c b/Src/Modules/mathfunc.c
index 67d5fd7d1..770894ce8 100644
--- a/Src/Modules/mathfunc.c
+++ b/Src/Modules/mathfunc.c
@@ -78,7 +78,7 @@ MF_TAN,
 MF_TANH,
 MF_Y0,
 MF_Y1,
-MF_YN
+MF_YN,
 };
 
 /*
diff --git a/Src/Zle/.distfiles b/Src/Zle/.distfiles
index add8f8466..34ae06000 100644
--- a/Src/Zle/.distfiles
+++ b/Src/Zle/.distfiles
@@ -3,6 +3,7 @@ DISTFILES_SRC='
     comp1.mdd comp.h comp1.c comp1.export
     compctl.mdd compctl.c
     complist.mdd complist.c
+    computil.mdd computil.c
     deltochar.mdd deltochar.c
     zle.mdd iwidgets.list zle.h zle_bindings.c zle_hist.c
     zle_keymap.c zle_main.c zle_misc.c zle_move.c zle_params.c
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 70371b41c..aa7686b64 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -811,7 +811,7 @@ check_param(char *s, int set, int test)
 		*b != '=' && *b != Equals &&
 		*b != '~' && *b != Tilde)
 		break;
-	if (*b == '#' || *b == Pound || *b == '+')
+	if (*b == '#' || *b == Pound || *b == '+' || *b == ' ')
 	    b++;
 
 	e = b;
@@ -6927,14 +6927,20 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd)
     if (cc->mask & (CC_JOBS | CC_RUNNING | CC_STOPPED)) {
 	/* Get job names. */
 	int i;
-	char *j;
+	char *j, *jj;
 
 	for (i = 0; i < MAXJOB; i++)
 	    if ((jobtab[i].stat & STAT_INUSE) &&
 		jobtab[i].procs && jobtab[i].procs->text) {
 		int stopped = jobtab[i].stat & STAT_STOPPED;
 
-		j = dupstring(jobtab[i].procs->text);
+		j = jj = dupstring(jobtab[i].procs->text);
+		/* Find the first word. */
+		for (; *jj; jj++)
+		    if (*jj == ' ') {
+			*jj = '\0';
+			break;
+		    }
 		if ((cc->mask & CC_JOBS) ||
 		    (stopped && (cc->mask & CC_STOPPED)) ||
 		    (!stopped && (cc->mask & CC_RUNNING)))
diff --git a/Src/builtin.c b/Src/builtin.c
index 088608138..a7c03acef 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -3153,8 +3153,7 @@ zexit(int val, int from_signal)
     HEAPALLOC {
 	if (isset(MONITOR) && !stopmsg && !from_signal) {
 	    scanjobs();    /* check if jobs need printing           */
-	    if (unset(SHJOBCONTROL))
-	        checkjobs();   /* check if any jobs are running/stopped */
+	    checkjobs();   /* check if any jobs are running/stopped */
 	    if (stopmsg) {
 		stopmsg = 2;
 		LASTALLOC_RETURN;
diff --git a/Src/init.c b/Src/init.c
index f0b9803e4..00ecd3ade 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -113,8 +113,8 @@ loop(int toplevel, int justonce)
 	if (!(list = parse_event())) {	/* if we couldn't parse a list */
 	    hend();
 	    if ((tok == ENDINPUT && !errflag) ||
-		(tok == LEXERR && (!isset(SHINSTDIN) || !toplevel)) ||
-		justonce)
+		(tok == LEXERR && (!noerrexit || emulation == EMULATE_KSH)
+		 && (!isset(SHINSTDIN) || !toplevel)) || justonce)
 		break;
 	    continue;
 	}
diff --git a/Src/main.c b/Src/main.c
index 762e06b90..c0999deae 100644
--- a/Src/main.c
+++ b/Src/main.c
@@ -87,7 +87,8 @@ main(int argc, char **argv)
     for (;;) {
 	do
 	    loop(1,0);
-	while (tok != ENDINPUT && (tok != LEXERR || isset(SHINSTDIN)));
+	while (tok != ENDINPUT &&
+	       (tok != LEXERR || noerrexit || isset(SHINSTDIN)));
 	if (tok == LEXERR) {
 	    stopmsg = 1;
 	    zexit(lastval, 0);
diff --git a/Src/options.c b/Src/options.c
index 35d4e779c..878ab2247 100644
--- a/Src/options.c
+++ b/Src/options.c
@@ -186,7 +186,6 @@ static struct optname optns[] = {
 {NULL, "shinstdin",	      OPT_SPECIAL,		 SHINSTDIN},
 {NULL, "shoptionletters",     OPT_EMULATE|OPT_BOURNE,	 SHOPTIONLETTERS},
 {NULL, "shortloops",	      OPT_EMULATE|OPT_NONBOURNE, SHORTLOOPS},
-{NULL, "shjobcontrol",	      OPT_EMULATE|OPT_NONZSH,	 SHJOBCONTROL},
 {NULL, "shwordsplit",	      OPT_EMULATE|OPT_BOURNE,	 SHWORDSPLIT},
 {NULL, "singlecommand",	      OPT_SPECIAL,		 SINGLECOMMAND},
 {NULL, "singlelinezle",	      OPT_KSH,			 SINGLELINEZLE},
diff --git a/Src/zsh.h b/Src/zsh.h
index db7514d77..9a5699160 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -1360,7 +1360,6 @@ enum {
     SHINSTDIN,
     SHOPTIONLETTERS,
     SHORTLOOPS,
-    SHJOBCONTROL,
     SHWORDSPLIT,
     SINGLECOMMAND,
     SINGLELINEZLE,