Skip to content

Commit

Permalink
20126: tidy up before 4.2.1
Browse files Browse the repository at this point in the history
20127: tweaked version of Wayne's patch to reexand prompts
  • Loading branch information
Peter Stephenson committed Jul 2, 2004
1 parent e9fa060 commit 8784bbe
Show file tree
Hide file tree
Showing 16 changed files with 65 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .distfiles
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
5 changes: 5 additions & 0 deletions Doc/Zsh/zle.yo
Original file line number Diff line number Diff line change
Expand Up @@ -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))(
Expand Down
3 changes: 2 additions & 1 deletion Etc/.distfiles
Original file line number Diff line number Diff line change
@@ -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
'
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions Etc/FAQ.yo
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
File renamed without changes.
17 changes: 17 additions & 0 deletions Etc/NEWS → NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 11 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions Src/Zle/zle_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
4 changes: 3 additions & 1 deletion Src/Zle/zle_refresh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down
1 change: 1 addition & 0 deletions Test/.distfiles
Original file line number Diff line number Diff line change
Expand Up @@ -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
'

0 comments on commit 8784bbe

Please sign in to comment.