diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2019-02-04 13:17:38 +0100 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2019-02-04 13:17:38 +0100 |
commit | ea17cf89d7680e1ceb19f80d3a6401cb07d1ee4f (patch) | |
tree | 5b5b623b3b51346b32711f24010fb1fd1e33f6ac | |
parent | 14d262602341f1a2d69aa9149a331d047851ef55 (diff) | |
parent | 8b89d0d57710d044e85591aac25952f5a6ae84c7 (diff) | |
download | zsh-ea17cf89d7680e1ceb19f80d3a6401cb07d1ee4f.tar.gz zsh-ea17cf89d7680e1ceb19f80d3a6401cb07d1ee4f.zip |
New upstream bugfix release 5.7.1
Merge branch 'upstream' at 'zsh-5.7.1' into 'debian'.
-rw-r--r-- | ChangeLog | 29 | ||||
-rw-r--r-- | Completion/Unix/Command/_dos2unix | 129 | ||||
-rw-r--r-- | Completion/Unix/Command/_git | 2 | ||||
-rw-r--r-- | Completion/Unix/Type/_date_formats | 19 | ||||
-rw-r--r-- | Config/version.mk | 4 | ||||
-rw-r--r-- | Etc/FAQ.yo | 2 | ||||
-rw-r--r-- | Etc/creating-a-release.txt | 44 | ||||
-rw-r--r-- | Functions/VCS_Info/Backends/VCS_INFO_detect_p4 | 1 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | Src/prompt.c | 2 | ||||
-rw-r--r-- | Test/D01prompt.ztst | 8 |
11 files changed, 227 insertions, 15 deletions
@@ -1,5 +1,34 @@ +2019-02-03 dana <dana@dana.is> + + * unposted: Config/version.mk, Etc/FAQ.yo, README: Update for + 5.7.1 + + * 44034: Completion/Unix/Type/_date_formats: Complete %9./%N, + adjust some wording + + * 44033: Completion/Unix/Command/_dos2unix: Add completion for + dos2unix/unix2dos + + * 44030: Src/prompt.c, Test/D01prompt.ztst: Return error for + unrecognised colour name + +2019-01-28 Fredric Silberberg <fred@silberberg.xyz> + + * github #32: Completion/Unix/Command/_git: Fix a typo in the + git tag completion. + +2018-01-27 dana <dana@dana.is> + + * unposted: Etc/creating-a-release.txt: Document additional + release steps + + * 44020: Functions/VCS_Info/Backends/VCS_INFO_detect_p4: Fix + infinite recursion + 2018-01-24 dana <dana@dana.is> + * unposted: Config/version.mk: Post-release version bump + * unposted: Config/version.mk, README: Update for 5.7 2018-01-23 dana <dana@dana.is> diff --git a/Completion/Unix/Command/_dos2unix b/Completion/Unix/Command/_dos2unix new file mode 100644 index 000000000..c7820a8ec --- /dev/null +++ b/Completion/Unix/Command/_dos2unix @@ -0,0 +1,129 @@ +#compdef dos2unix unix2dos mac2unix unix2mac + +local variant ret=1 +local -a context expl line state state_descr cp_opts xl_opts args +local -A opt_args + +# Code-page options for ISO translation (use group `cp`) +cp_opts=( + '(-7 -ascii)-437[use DOS code page 437 (US) for ISO translation]' + '(-7 -ascii)-850[use DOS code page 850 (Western European) for ISO translation]' + '(-7 -ascii)-860[use DOS code page 860 (Portuguese) for ISO translation]' + '(-7 -ascii)-863[use DOS code page 863 (French Canadian) for ISO translation]' + '(-7 -ascii)-865[use DOS code page 865 (Nordic) for ISO translation]' + + '(-7 -ascii)-1252[use Windows code page 1252 (Western European) for ISO translation]' +) +# Translation/conversion options (use group `xl`) +xl_opts=( + '(cp)-7[also replace 8-bit characters by 7-bit spaces]' + '(cp)-ascii[convert only line breaks (CRLF<->LF)]' + '-iso[also convert between DOS and ISO character sets]' + + {-c,--convmode}'[specify conversion mode]:conversion mode:(( + 7bit\:"also replace 8-bit characters by 7-bit spaces" + ascii\:"convert only line breaks (CRLF<->LF)" + iso\:"also convert between DOS and ISO character sets" + mac\:"convert only line breaks (CR<->LF)" + ))' + {-ub,--assume-utf16be}'[assume input file format is UTF-16BE]' + {-ul,--assume-utf16le}'[assume input file format is UTF-16LE]' +) + +# `dos2unix` here is the dos2unix package provided by many Linux distributions, +# Homebrew, &al. `unix2dos` is the unix2dos package provided by FreeBSD, &al. +# Some implementations (Solaris) don't bother with any kind of argument +# validation, so we pass in /dev/null to make sure they never hang +_pick_variant -r variant \ + dos2unix='(#i)waterlan' \ + unix2dos='-p' \ + $OSTYPE \ + --version /dev/null{,} + +case $variant in + dos2unix) + # -D and -gb are omitted, since they only make sense on Windows + args=( + '(: * -)'{-h,--help}'[display help information]' + '(: * -)'{-L,--license}'[display license information]' + '(: * -)'{-V,--version}'[display version information]' + '(-l --newline)'{-l,--newline}'[write two line breaks to output for each converted line break]' + '(-u --keep-utf16)'{-u,--keep-utf16}'[write output in same UTF-16 encoding as input]' + '*:: :->file' + + '(qv)' # Verbosity options + {-q,--quiet}'[reduce output verbosity]' + {-v,--verbose}'[increase output verbosity]' + + '(cp)' # Code-page options + $cp_opts + + '(xl)' # Translation/conversion options + $xl_opts + + bm # BOM options + '(-b -r --keep-bom --remove-bom)'{-b,--keep-bom}'[write existing BOM to output]' + '(-m -r --add-bom --remove-bom)'{-m,--add-bom}'[write new BOM to output]' + '(bm)'{-r,--remove-bom}"[don't write BOM to output]" + + '(ch)' # chown options + '--allow-chown[allow file-ownership changes in old-file mode]' + "--no-allow-chown[don't allow file-ownership changes in old-file mode]" + + '(fs)' # Force/safe options + {-f,--force}'[force conversion of binary files]' + {-s,--safe}'[skip binary files]' + + '(in)' # Info options + {-i-,--info=-}'[display (specified) file information]:: :->info' + + '(ln)' # Symlink options + {-F,--follow-symlink}'[follow symbolic links]' + {-R,--replace-symlink}'[replace symbolic links]' + {-S,--skip-symlink}'[skip symbolic links]' + + '(no)' # File-mode options + {-n,--newfile}'[convert each input file to specified output file]' + {-o,--oldfile}'[convert input files in place]' + ) + # No stacking! + _arguments -S -A '-*' : $args && ret=0 + + case $state in + file) + if (( CURRENT % 2 == 0 )) && [[ -n ${opt_args[(I)*-(-n|--newfile)]} ]]; then + _description files expl 'output file' + else + _description files expl 'input file' + fi + _files "${(@)expl}" && ret=0 + ;; + info) + _values -s '' 'information flag [dumbt]' \ + '0[end each output line with NUL instead of newline]' \ + 'b[show BOM type]' \ + 'c[show only files that would be converted]' \ + 'd[show number of DOS line breaks (CRLF)]' \ + 'h[show header]' \ + 'm[show number of Mac line breaks (CR)]' \ + 'p[show file names without paths]' \ + 't[show whether file is text or binary]' \ + 'u[show number of UNIX line breaks (LF)]' \ + && ret=0 + ;; + esac + + return ret + ;; + unix2dos) + _arguments -s -S -A '-*' : \ + '-p[preserve access and modification times]' \ + '*:input file:_files' + return + ;; + solaris*) + _arguments -A '-*' : \ + '1:input file:_files' \ + '2:output file:_files' \ + + '(cp)' \ + ${(@M)cp_opts:#(|\([^\)]#\))-(437|850|860|863|865)(|\[*)} \ + + '(xl)' \ + ${(@M)xl_opts:#(|\([^\)]#\))-(7|ascii|iso)(|\[*)} + return + ;; + *) + _default + return + ;; +esac diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 0ebbbe861..b3e54f7f9 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -2049,7 +2049,7 @@ _git-tag () { '(-i --ignore-case)'{-i,--ignore-case}'[sorting and filtering are case-insensitive]' \ ':: :_guard "^-*" pattern' \ - verification \ - '(-v --verify)'{-v,--verify}'[verify gpg signutare of tags]' \ + '(-v --verify)'{-v,--verify}'[verify gpg signature of tags]' \ '*:: :__git_ignore_line_inside_arguments __git_tags' } diff --git a/Completion/Unix/Type/_date_formats b/Completion/Unix/Type/_date_formats index 6bd5c6d6b..889a95779 100644 --- a/Completion/Unix/Type/_date_formats +++ b/Completion/Unix/Type/_date_formats @@ -24,7 +24,7 @@ specs=( 'c:preferred locale date and time' 'C:2-digit century' 'd:day of month (01-31)' - 'D:american format month/day/year (%m/%d/%y)' + 'D:American format month/day/year (%m/%d/%y)' 'e:day of month ( 1-31)' 'F:ISO 8601 year-month-date (%Y-%m-%d)' 'G:4-digit ISO 8601 week-based year' @@ -44,21 +44,25 @@ specs=( 'S:seconds (00-60)' 't:tab' 'T:24-hour notation with seconds (%H:%M:%S)' - 'u:day of week (1-7, 1=monday)' - 'U:week number of current year, sunday based (00-53)' + 'u:day of week (1-7, 1=Monday)' + 'U:week number of current year, Sunday based (00-53)' 'V:ISO 8601 week number of current year, week 1 has 4 days in current year (01-53)' - 'w:day of week (0-6, 0=sunday)' - 'W:week number of current year, monday based (00-53)' + 'w:day of week (0-6, 0=Sunday)' + 'W:week number of current year, Monday based (00-53)' 'x:locale dependent date representation without time' 'X:locale dependent time representation without date' 'y:2-digit year (00-99)' 'Y:full year' 'z:UTC offset' 'Z:timezone name' - '%:A %' + '%:literal %' ) case $OSTYPE in + linux-gnu) + [[ $1 == zsh ]] || # %N is handled below in this case + specs+=( 'N:fractional part of seconds since epoch, in nanoseconds' ) + ;| freebsd*|dragonfly*|darwin*|linux-gnu|solaris2.<11->) specs+=( 'E:alternate representation' @@ -91,6 +95,7 @@ if [[ $1 == zsh ]]; then 'f:day of month (1-31)' 'K:hour (0-23)' 'L:hour (0-12)' + 'N:fractional part of seconds since epoch, in nanoseconds (%9.)' '.:fractional part of seconds since epoch' "-:don't pad numeric values" ) @@ -102,4 +107,4 @@ done _describe -t date-format-specifier 'date format specifier' specs \ -p "${(Q)PREFIX:-%}" -S '' -[[ $1 == zsh ]] && _message -e date-format-precision 'precision for %%. (1-6)' +[[ $1 == zsh ]] && _message -e date-format-precision 'precision for %%. (1-9)' diff --git a/Config/version.mk b/Config/version.mk index 4f95a40da..7d931f29b 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=5.7 -VERSION_DATE='January 24, 2019' +VERSION=5.7.1 +VERSION_DATE='February 3, 2019' diff --git a/Etc/FAQ.yo b/Etc/FAQ.yo index 6c46cc09d..c4f65e97a 100644 --- a/Etc/FAQ.yo +++ b/Etc/FAQ.yo @@ -307,7 +307,7 @@ sect(On what machines will it run?) sect(What's the latest version?) - Zsh 5.7 is the latest production version. For details of all the + Zsh 5.7.1 is the latest production version. For details of all the changes, see the NEWS file in the source distribution. A beta of the next version is sometimes available. Development of zsh is diff --git a/Etc/creating-a-release.txt b/Etc/creating-a-release.txt index fd52da86a..dfde269ae 100644 --- a/Etc/creating-a-release.txt +++ b/Etc/creating-a-release.txt @@ -17,7 +17,7 @@ To create a zsh release: - Commit those changes with an "unposted" ChangeLog entry. - git commit -am "Test release: 5.5.1-test-1." && + git commit -am "Test release: 5.5.1-test-1." && zshdev-add-nnnnn-and-changelog unposted # (Everyone has a different way of getting the "unposted" magic string # into ChangeLog and the log message. This script is how I do it; YMMV; @@ -38,6 +38,7 @@ To create a zsh release: git checkout zsh-5.5.1-test-1 git diff HEAD # ensure no local mods + rm -f Doc/help.txt Doc/help/[_a-zA-Z0-9]* # some devs have had issues with these Util/preconfig && ./configure ... make -C Etc make -C Doc everything @@ -55,7 +56,46 @@ To create a zsh release: Stable releases to zsh/ and zsh-doc/. After uploading, select the tar.xz artifact, press the 🛈 button ("View Details") to its right, and press [Select All] next to "Default Download For:". This should cause sf.net to offer that artifact in the "Looking for the latest version?" line. -- Upload to zsh.org +- If the new release is a stable release, update zsh.sf.net: + + # Move into the 'web' repository mentioned above + cd /path/to/web/repo + git pull + + # Review the README, in case there is any new information there + cat README + + # Run release.zsh to update the documentation from the main repository + # (making sure you still have checked out the tag you created!) + ZSHPATH=/path/to/zsh/repo ./release.zsh + + # Commit changes + git commit -am 'Doc, FAQ, Intro: Update for <version>' # replace <version> + + # Update the files mentioned in the release.zsh instructions (just + # adhere to the existing structure/format) + $EDITOR index.html + $EDITOR News/index.html + $EDITOR releases.html + + # Run release-update-versions.zsh to update the names and sizes of the + # files listed on the documentation index and source page + ./release-update-versions.zsh <version> # replace <version> + + # Commit changes + git commit -am 'Update downloads, notes, etc., for <version>' # replace <version> + + # Tag and push changes + git tag -sm 'Release of zsh <version>' zsh-<version> # replace <version> + git push + + # Post changes; see web/README for the full rsync command. When in + # doubt, use `rsync -n` to perform a dry run. Note that changes may take + # several minutes to appear afterwards + rsync ... + +- Upload the build artefacts to zsh.org/pub; you may need assistance from + another dev if you don't have access to do this. - Post to -workers@ diff --git a/Functions/VCS_Info/Backends/VCS_INFO_detect_p4 b/Functions/VCS_Info/Backends/VCS_INFO_detect_p4 index d171c68ee..5ec21da9f 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_detect_p4 +++ b/Functions/VCS_Info/Backends/VCS_INFO_detect_p4 @@ -44,7 +44,6 @@ VCS_INFO_p4_get_server() { } -(( ${+functions[VCS_INFO_detect_p4]} )) || VCS_INFO_detect_p4() { local serverport p4where @@ -5,7 +5,7 @@ THE Z SHELL (ZSH) Version ------- -This is version 5.7 of the shell. This is a stable release. There are +This is version 5.7.1 of the shell. This is a stable release. There are a few visible improvements since 5.6 as well as many bugfixes. Note in particular the changes highlighted under "Incompatibilities since diff --git a/Src/prompt.c b/Src/prompt.c index 4603ffba6..f2b3f161e 100644 --- a/Src/prompt.c +++ b/Src/prompt.c @@ -1663,6 +1663,8 @@ match_colour(const char **teststrp, int is_fg, int colour) /* default */ return is_fg ? TXTNOFGCOLOUR : TXTNOBGCOLOUR; } + if (colour < 0) + return TXT_ERROR; } else { colour = (int)zstrtol(*teststrp, (char **)teststrp, 10); diff --git a/Test/D01prompt.ztst b/Test/D01prompt.ztst index 56b7c294a..7ff478e68 100644 --- a/Test/D01prompt.ztst +++ b/Test/D01prompt.ztst @@ -221,3 +221,11 @@ print ${(%U)Y-%(v} 0:Regression test for test on empty psvar > + +# Unrecognised colour strings should produce the default sequence + f=${(%):-'%f'} # Recognised + Fdefault=${(%):-'%F{default}'} # Recognised + Freset=${(%):-'%F{reset}'} # Unrecognised + Ffoo=${(%):-'%F{foo}'} # Unrecognised + [[ $f == $Fdefault && $Fdefault == $Freset && $Freset == $Ffoo ]] +0:Regression test for workers/44029 |