about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.distfiles3
-rw-r--r--ChangeLog12
-rw-r--r--Doc/Zsh/zle.yo5
-rw-r--r--Etc/.distfiles3
-rw-r--r--Etc/ChangeLog-3.0 (renamed from ChangeLog.3.0)0
-rw-r--r--Etc/ChangeLog-3.1 (renamed from ChangeLog-3.1)0
-rw-r--r--Etc/ChangeLog-4.1 (renamed from ChangeLog-4.1)0
-rw-r--r--Etc/FAQ.yo4
-rw-r--r--FEATURES (renamed from Etc/FEATURES)0
-rw-r--r--INSTALL4
-rw-r--r--MACHINES (renamed from Etc/MACHINES)0
-rw-r--r--NEWS (renamed from Etc/NEWS)17
-rw-r--r--README14
-rw-r--r--Src/Zle/zle_main.c10
-rw-r--r--Src/Zle/zle_refresh.c4
-rw-r--r--Test/.distfiles1
16 files changed, 65 insertions, 12 deletions
diff --git a/.distfiles b/.distfiles
index 8051e2db2..f116fb4c5 100644
--- a/.distfiles
+++ b/.distfiles
@@ -1,6 +1,7 @@
 DISTFILES_SRC='
     .cvsignore .distfiles .preconfig Makefile.in
-    ChangeLog ChangeLog-3.1 ChangeLog.3.0 INSTALL LICENCE META-FAQ README
+    ChangeLog
+    FEATURES INSTALL LICENCE MACHINES META-FAQ NEWS README
     aclocal.m4 aczsh.m4 configure.ac
     configure config.h.in stamp-h.in
     config.guess config.sub install-sh mkinstalldirs 
diff --git a/ChangeLog b/ChangeLog
index ff459eab9..e3e86d35e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2004-07-02  Peter Stephenson  <pws@csr.com>
 
+	* 20127: Doc/Zsh/zle.yo, Src/Zle/zle_main.c,
+	Src/Zle/zle_refresh.c: slightly tweaked version of Wayne's
+	patch in users/7652 which only reexpands the prompt when
+	the commandline was trashed by output.
+
+	* 20126, with modifications: .distfiles, ChangeLog-3.1,
+	ChangeLog-4.1, ChangeLog.3.0, FEATURES, INSTALL, MACHINES,
+	NEWS, README, Etc/.distfiles, Etc/ChangeLog-3.1,
+	Etc/ChangeLog-4.1, Etc/FAQ.yo, Etc/FEATURES, Etc/MACHINES,
+	Etc/NEWS, Test/.distfiles, Etc/ChangeLog-3.0: tidy up
+	ready for 4.2.1
+
 	* 20125: Doc/Zsh/jobs.yo: say where the output for job
 	notifications goes.
 
diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo
index 94d7a7677..6c0b36005 100644
--- a/Doc/Zsh/zle.yo
+++ b/Doc/Zsh/zle.yo
@@ -1745,6 +1745,11 @@ does not reflect changes to the prompt variables themselves, only changes
 in the expansion of the values (for example, changes in time or
 directory, or changes to the value of variables referred to by the
 prompt).
+
+Otherwise, the prompt is only expaned each time zle starts, and
+when the display as been interrupted by output from another part of the
+shell (such as a job notification) which causes the command line to be
+reprinted.
 )
 tindex(send-break)
 item(tt(send-break) (^G ESC-^G) (unbound) (unbound))(
diff --git a/Etc/.distfiles b/Etc/.distfiles
index 675556130..6d0b5e7e7 100644
--- a/Etc/.distfiles
+++ b/Etc/.distfiles
@@ -1,7 +1,8 @@
 DISTFILES_SRC='
     .cvsignore .distfiles Makefile.in
-    BUGS CONTRIBUTORS FAQ FAQ.yo FEATURES MACHINES NEWS STD-TODO TODO
+    BUGS CONTRIBUTORS FAQ FAQ.yo STD-TODO TODO
     FTP-README pubring.pgp
     completion-style-guide zsh-development-guide
     changelog2html.pl
+    ChangeLog-3.1 ChangeLog-3.0 ChangeLog-4.1
 '
diff --git a/ChangeLog.3.0 b/Etc/ChangeLog-3.0
index c53b2fb38..c53b2fb38 100644
--- a/ChangeLog.3.0
+++ b/Etc/ChangeLog-3.0
diff --git a/ChangeLog-3.1 b/Etc/ChangeLog-3.1
index 4327435ea..4327435ea 100644
--- a/ChangeLog-3.1
+++ b/Etc/ChangeLog-3.1
diff --git a/ChangeLog-4.1 b/Etc/ChangeLog-4.1
index a128d6a70..a128d6a70 100644
--- a/ChangeLog-4.1
+++ b/Etc/ChangeLog-4.1
diff --git a/Etc/FAQ.yo b/Etc/FAQ.yo
index 019c8aa11..b89213cc3 100644
--- a/Etc/FAQ.yo
+++ b/Etc/FAQ.yo
@@ -275,7 +275,7 @@ sect(On what machines will it run?)
   mechanism.  This considerably increases flexibility over the old
   `buildzsh' mechanism.  Consequently, zsh should compile and run on
   any modern version of UNIX, and a great many not-so-modern versions
-  too.  The file Etc/MACHINES in the distribution has more details.
+  too.  The file MACHINES in the distribution has more details.
 
   There are also now separate ports for Windows and OS/2, see `Where
   do I get it' below.
@@ -288,7 +288,7 @@ sect(On what machines will it run?)
 
   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
-  directory.  Also read the Etc/MACHINES file for up-to-date
+  directory.  Also read the MACHINES file for up-to-date
   information on compilation on certain architectures.
 
   mybf(Note for users of nawk) (The following information comes from Zoltan
diff --git a/Etc/FEATURES b/FEATURES
index 95a0d617c..95a0d617c 100644
--- a/Etc/FEATURES
+++ b/FEATURES
diff --git a/INSTALL b/INSTALL
index 24e96a624..5ed5abc03 100644
--- a/INSTALL
+++ b/INSTALL
@@ -15,7 +15,7 @@ MAKING AND INSTALLING
 Check MACHINES File
 -------------------
 
-Check the file MACHINES in the subdirectory Etc to see the architectures
+Check the file MACHINES in the top directory to see the architectures
 that zsh is known to compile on, as well as any special instructions
 for your particular architecture.  Most architectures will not require any
 special instructions.
@@ -243,7 +243,7 @@ which reduce memory usage on some systems. To use these, add the option
   --enable-zsh-mem
 when invoking "configure".
 
-You should check Etc/MACHINES to see if there are specific recommendations
+You should check MACHINES to see if there are specific recommendations
 about using the zsh malloc routines on your particular architecture.
 
 Debugging Routines
diff --git a/Etc/MACHINES b/MACHINES
index 2f44f7629..2f44f7629 100644
--- a/Etc/MACHINES
+++ b/MACHINES
diff --git a/Etc/NEWS b/NEWS
index 0e5983b80..905f9456b 100644
--- a/Etc/NEWS
+++ b/NEWS
@@ -5,6 +5,23 @@ CHANGES FROM PREVIOUS VERSIONS OF ZSH
 Changes since zsh version 4.2.0
 -------------------------------
 
+- A new `try block' and `always block' syntax has been introduced
+  to make it easier to ensure the shell runs important tidy-up code
+  in the event of an error.  It also runs after a break, continue, or
+  return, including a return forced by the ERR_RETURN option,
+  but not an exit, which is immediate).  The syntax is:
+    `{'  try-block-list `}' `always' `{' always-block-list `}'
+  where no newline or semicolon may appear between `}' and `always'.
+  This is compatible with all previous valid zsh syntax as an `always'
+  at that point used to be a syntax error.  For example,
+    { echo Code run in current shell } always { echo Tidy-up code }
+
+- A new zle widget reset-prompt has been added to re-expand the current
+  prompt.  Note that this does not take account of changes to the
+  prompt variables themselves, only the expansion of the text.  The
+  same effect is now forced by a job change notification, making
+  the %j prompt escape and %(j..) ternary expression more useful.
+
 - The zftp module supports ports following the hostname in the normal suffix
   notation, `host:port'.  This requires IPv6 colon-style addresses to be
   specified in suitably quoted square brackets, for example:
diff --git a/README b/README
index 6f58bbccd..b2bf31894 100644
--- a/README
+++ b/README
@@ -5,25 +5,33 @@ THE Z SHELL (ZSH)
 Version
 -------
 
-This is zsh version 4.2.0.  This is a stable release.
+This is zsh version 4.2.1.  This is a stable release.
 
 Installing Zsh
 --------------
 
 The instructions for compiling zsh are in the file INSTALL.  You should
-also check the file MACHINES in the subdirectory Etc to see if there
+also check the file MACHINES in the top directory to see if there
 are any special instructions for your particular architecture.
 
 Features
 --------
 
 Zsh is a shell with lots of features.  For a list of some of these, see the
-file Etc/FEATURES, and for the latest changes see Etc/NEWS.  For more
+file FEATURES, and for the latest changes see NEWS.  For more
 details, see the documentation.
 
 Possible incompatibilities
 ---------------------------
 
+Currently the only known incompatibilities between 4.2.0 and later
+versions are minor: IPv6 addresses must be specified in
+square brackets in the zftp module and function system; special
+traps for pseudosignals ZERR, DEBUG and EXIT are no longer executed
+inside other traps (users may well have assumed this was the case anyway
+since the behaviour was not explicity documented).  See the NEWS file for
+more detail.
+
 Some particular differences you may notice since version 4.0:
 
 The bash-compatibility zle functions described in the zshcontrib manual
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 6f66aa104..3f13c8af3 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1311,14 +1311,20 @@ recursiveedit(UNUSED(char **args))
 }
 
 /**/
-int
-resetprompt(UNUSED(char **args))
+void
+reexpandprompt(void)
 {
     free(lpromptbuf);
     lpromptbuf = promptexpand(raw_lp, 1, NULL, NULL);
     free(rpromptbuf);
     rpromptbuf = promptexpand(raw_rp, 1, NULL, NULL);
+}
 
+/**/
+int
+resetprompt(UNUSED(char **args))
+{
+    reexpandprompt();
     return redisplay(NULL);
 }
 
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c
index 08516939a..c0da11c89 100644
--- a/Src/Zle/zle_refresh.c
+++ b/Src/Zle/zle_refresh.c
@@ -291,7 +291,9 @@ zrefresh(void)
     unsigned char *tmpline;	/* line with added pre/post text */
     int tmpcs, tmpll;		/* ditto cursor position and line length */
     int tmpalloced;		/* flag to free tmpline when finished */
-	
+
+    if (trashedzle)
+	reexpandprompt();
 
     /* If this is called from listmatches() (indirectly via trashzle()), and *
      * that was called from the end of zrefresh(), then we don't need to do  *
diff --git a/Test/.distfiles b/Test/.distfiles
index 310744772..b806994b3 100644
--- a/Test/.distfiles
+++ b/Test/.distfiles
@@ -9,5 +9,6 @@ A04redirect.ztst     D01prompt.ztst       V02zregexparse.ztst
 A05execution.ztst    D02glob.ztst         Y01completion.ztst
 D06subscript.ztst    V01zmodload.ztst     E01options.ztst
 B02typeset.ztst      B03print.ztst        A06assign.ztst       B04read.ztst
+V03mathfunc.ztst
 README
 '