From b5fcc04f0e29ff00cb72b0e5c0bc9976c1c5eb33 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 3 Mar 2014 11:57:56 +0100 Subject: 32436: allow = to be used in ZLS_COLORS patterns if it is quoted or inside parentheses --- ChangeLog | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 1cd1431d5..d35f5b049 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-03-03 Oliver Kiddle + + * 32436: Src/Zle/complist.c: allow = to be used in ZLS_COLORS + patterns if it is quoted or inside parentheses + 2014-03-01 Peter Stephenson * 32453: Functions/Misc/zcalc: fix default base handling. @@ -18,7 +23,7 @@ Completion/Unix/Command/_rm: improved quoting for ignore-line style. -2014-02-24 Oliver Kiddle +2014-02-24 Oliver Kiddle * unposted: Doc/Zsh/compsys.yo: fix typo @@ -100,7 +105,7 @@ * 32388: Doc/Zsh/mod_zutil.yo, Src/Modules/zutil.c: zparseopts -K preserves individual associative array elements -2014-02-14 Oliver Kiddle +2014-02-14 Oliver Kiddle * 32361: Src/Zle/zle_tricky.c: don't reset lastline before completion @@ -118,7 +123,7 @@ * Martin Vaeth: 32356: Util/helpfiles: fix a typo. -2014-02-05 Oliver Kiddle +2014-02-05 Oliver Kiddle * 32355: Doc/Zsh/zle.yo Test/X02zlevi.ztst Test/comptest: document and test vi mode undo changes @@ -153,7 +158,7 @@ unset for better compatibility in emulation modes; for the same reason, remove the readonly flag from $_ -2014-01-31 Oliver Kiddle +2014-01-31 Oliver Kiddle * 32314: Src/Zle/zle_main.c, Src/Zle/zle_tricky.c, Src/Zle/zle_utils.c, Src/Zle/zle_vi.c: merge undo events @@ -1560,7 +1565,7 @@ * users/17665: Doc/Zsh/options.yo, Src/math.c, Src/options.c, Src/zsh.h, Test/C01arith.ztst: add FORCE_FLOAT option. -2013-02-27 Oliver Kiddle +2013-02-27 Oliver Kiddle * 31076: Completion/Linux/Command/_yast, Completion/Unix/Type/_pids, Completion/Unix/Type/_pdf: @@ -1581,7 +1586,7 @@ * 31060: Src/builtin.c: "+" before a flag for "functions" or "autoload" should suppress display of function body. -2013-02-21 Oliver Kiddle +2013-02-21 Oliver Kiddle * 31058: Completion/Zsh/Command/_fc, Completion/Unix/Command/_cut, Completion/Unix/Command/_sed, Completion/Unix/Command/_wget, @@ -1593,7 +1598,7 @@ * 31055: Completion/compaudit: missing '$' in search of /proc file system. -2013-02-12 Oliver Kiddle +2013-02-12 Oliver Kiddle * 31041: Test/comptest, Test/X02zlevi.ztst: add support for testing line editor widgets from the test suite @@ -1601,7 +1606,7 @@ * unposted: Etc/zsh-development-guide: remove duplication in git guidelines -2013-02-09 Oliver Kiddle +2013-02-09 Oliver Kiddle * Morita Sho: 31038: Completion/Unix/Type/_terminals: add location of terminfo entries on Debian @@ -1658,7 +1663,7 @@ modifiers :wq operating on an empty string crashed the shell. The shell isn't supposed to crash. -2013-01-20 Oliver Kiddle +2013-01-20 Oliver Kiddle * 30987: Completion/X/Command/_xrandr: only call xrandr when necessary and use _call_program @@ -1716,7 +1721,7 @@ * unposted: Config/version.mk: zsh 5.0.1. -2012-12-18 Oliver Kiddle +2012-12-18 Oliver Kiddle * 30877: Etc/zsh-development-guide: document git workflow @@ -1750,7 +1755,7 @@ * users/17445: Src/math.c, Test/C01arith.ztst: fix handling of leading zeroes in floating point. -2012-11-20 Oliver Kiddle +2012-11-20 Oliver Kiddle * 30811: Completion/Linux/Command/_btrfs, Completion/Unix/Command/_mount: new completion for btrfs and @@ -1765,7 +1770,7 @@ * users/17042: Src/jobs.c: don't stomp the environment in "jobs -Z" unless we've first copied it to new memory. -2012-11-16 Oliver Kiddle +2012-11-16 Oliver Kiddle * 30802: Completion/Unix/Command/_find: add new command switches @@ -1783,7 +1788,7 @@ * 30800: Michal Halenka: Completion/Unix/Command/_arping: fix option. -2012-11-12 Oliver Kiddle +2012-11-12 Oliver Kiddle * 30795: Completion/Unix/Command/_xz, Completion/Unix/Command/_bzip2: new xz completion, new bzip2 options @@ -1791,7 +1796,7 @@ * 30794: Completion/Unix/Command/_irssi, Completion/Unix/Command/_mutt: update for new options -2012-11-11 Oliver Kiddle +2012-11-11 Oliver Kiddle * 30793: Completion/Unix/Command/_getent, Completion/Unix/Command/_iconv, Completion/Unix/Command/_ldd: @@ -1811,7 +1816,7 @@ * 30780: Doc/Zsh/builds.yo: document that set -o failures are hard but setopt failures are soft. -2012-11-07 Oliver Kiddle +2012-11-07 Oliver Kiddle * Benjamin R. Haskell: 30737: Completion/Unix/Command/_git: make custom completion functions for git aliases easier @@ -1880,7 +1885,7 @@ Test/C04funcdef.ztst: emulate command evaluations should apply sticky emulation to autoloads, too. -2012-10-07 Oliver Kiddle +2012-10-07 Oliver Kiddle * unposted: Completion/Unix/Command/_webbrowser, Completion/Unix/Type/_pspdf: add evince, zathura, dwb @@ -1934,7 +1939,7 @@ Functions/VCS_Info/Backends/VCS_INFO_detect_fossil: Fix fossil detection on unix -2012-09-28 Oliver Kiddle +2012-09-28 Oliver Kiddle * 30697: Completion/Unix/Command/_dbus: new completion definition -- cgit 1.4.1 From 1f290a3e8277347a782a7766948aab47c10120c8 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 3 Mar 2014 12:08:45 +0100 Subject: 32439: add new show-ambiguity style --- ChangeLog | 3 +++ Completion/Base/Core/_main_complete | 8 ++++++++ Doc/Zsh/compsys.yo | 9 +++++++++ 3 files changed, 20 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index d35f5b049..cf4e223d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-03-03 Oliver Kiddle + * 32439 (with Yuri D'Elia): Completion/Base/Core/_main_complete: + add new show-ambiguity style + * 32436: Src/Zle/complist.c: allow = to be used in ZLS_COLORS patterns if it is quoted or inside parentheses diff --git a/Completion/Base/Core/_main_complete b/Completion/Base/Core/_main_complete index 8dd781dbb..e881ea6a1 100644 --- a/Completion/Base/Core/_main_complete +++ b/Completion/Base/Core/_main_complete @@ -334,6 +334,14 @@ elif [[ nm -eq 0 && -z "$_comp_mesg" && compadd -x "$mesg" fi +if zstyle -s ":completion:${curcontext}:" show-ambiguity tmp; then + local prefix=${${compstate[unambiguous]}[1,${compstate[unambiguous_cursor]}-1]} + local toquote='[=\(\)\|~^?*[\]#<>]' + [[ $tmp = (yes|true|on) ]] && tmp=4 + [[ -n $prefix ]] && + _comp_colors+=( "=(#i)${prefix[1,-2]//?/(}${prefix[1,-2]//(#m)?/${MATCH/$~toquote/\\$MATCH}|)}${prefix[-1]//(#m)$~toquote/\\$MATCH}(#b)(?|)*==$tmp" ) +fi + [[ "$_comp_force_list" = always || ( "$_comp_force_list" = ?* && nm -ge _comp_force_list ) ]] && compstate[list]="${compstate[list]//messages} force" diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index c304461e2..5a5e61996 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -2440,6 +2440,15 @@ completing words for the dict command. It allows words from different dictionary databases to be added separately. The default for this style is `false'. ) +kindex(show-ambiguity, completion style) +item(tt(show-ambiguity))( +If the tt(zsh/complist) module is loaded, this style can be used to +highlight the first ambiguous character in completion lists. The +value is either a color indication such as those supported by the +tt(list-colors) style or, with a value of tt(true), a default of +underlining is selected. The highlighting is only applied if the +completion display strings correspond to the actual matches. +) kindex(show-completer, completion style) item(tt(show-completer))( Tested whenever a new completer is tried. If it is true, the completion -- cgit 1.4.1 From 97115e0e7f33378390aabd3c15d0cd69bf8d191c Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 3 Mar 2014 12:14:01 +0100 Subject: 32448: fix seg fault if $WIDGET is accessed after recursive-edit is interrupted --- ChangeLog | 2 ++ Src/Zle/zle_params.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index cf4e223d3..78ba84809 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2014-03-03 Oliver Kiddle + * 32448: Src/Zle/zle_params.c: fix seg fault after recursive-edit + * 32439 (with Yuri D'Elia): Completion/Base/Core/_main_complete: add new show-ambiguity style diff --git a/Src/Zle/zle_params.c b/Src/Zle/zle_params.c index a9bbf136a..5845207fa 100644 --- a/Src/Zle/zle_params.c +++ b/Src/Zle/zle_params.c @@ -363,7 +363,7 @@ get_prebuffer(UNUSED(Param pm)) static char * get_widget(UNUSED(Param pm)) { - return bindk->nam; + return bindk ? bindk->nam : ""; } /**/ -- cgit 1.4.1 From f62bd9c06c76b2b34a5e5454aa6f8617c7289b30 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 3 Mar 2014 12:17:28 +0100 Subject: 32450: make get-line widget set the history number that was saved with the line --- ChangeLog | 3 +++ Src/Zle/zle_hist.c | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 78ba84809..af2fac8d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-03-03 Oliver Kiddle + * 32450: Src/Zle/zle_hist.c: make get-line set the history + number that was saved with the line + * 32448: Src/Zle/zle_params.c: fix seg fault after recursive-edit * 32439 (with Yuri D'Elia): Completion/Base/Core/_main_complete: diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c index bd5bc36d5..44b39d186 100644 --- a/Src/Zle/zle_hist.c +++ b/Src/Zle/zle_hist.c @@ -890,6 +890,10 @@ zgetline(UNUSED(char **args)) free(s); free(lineadd); clearlist = 1; + if (stackhist != -1) { + histline = stackhist; + stackhist = -1; + } } return 0; } -- cgit 1.4.1 From 7d301a527e729e2a2fda03069e485bdcc2e12823 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 3 Mar 2014 16:50:14 +0100 Subject: 32441: add completer for file extensions --- ChangeLog | 3 +++ Completion/Base/Completer/_extensions | 33 +++++++++++++++++++++++++++++++++ Doc/Zsh/compsys.yo | 9 +++++++++ 3 files changed, 45 insertions(+) create mode 100644 Completion/Base/Completer/_extensions (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index af2fac8d2..806b14cc7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-03-03 Oliver Kiddle + * 32441: Completion/Base/Completer/_extensions, Doc/Zsh/compsys.yo: + add completer for file extensions + * 32450: Src/Zle/zle_hist.c: make get-line set the history number that was saved with the line diff --git a/Completion/Base/Completer/_extensions b/Completion/Base/Completer/_extensions new file mode 100644 index 000000000..8b6c4fd6a --- /dev/null +++ b/Completion/Base/Completer/_extensions @@ -0,0 +1,33 @@ +#autoload + +# This completer completes filename extensions when completing +# after *. or ^*. It can be used anywhere in the completer list +# but if used after _expand, patterns that already match a file +# will be expanded before it is called. + +compset -P '(#b)([~$][^/]#/|)(*/|)(\^|)\*.' || return 1 + +local -aU files +local -a expl suf mfiles + +files=( ${(e)~match[1]}${match[2]}*.* ) || return 1 +eval set -A files '${(MSI:'{1..${#${(O)files//[^.]/}[1]}}':)files%%.[^/]##}' +files=( ${files:#.<->(.*|)} ) + +if zstyle -t ":completion:${curcontext}:extensions" prefix-hidden; then + files=( ${files#.} ) +else + PREFIX=".$PREFIX" + IPREFIX="${IPREFIX%.}" +fi + +zstyle -T ":completion:${curcontext}:extensions" add-space || + suf=( -S '' ) + +_description extensions expl 'file extension' + +# for an exact match, fail so as to give _expand or _match a chance. +compadd -O mfiles "$expl[@]" -a files +[[ $#mfiles -gt 1 || ${mfiles[1]} != $PREFIX ]] && + compadd "$expl[@]" "$suf[@]" -a files && + [[ -z $compstate[exact_string] ]] diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index 5a5e61996..f015bbf92 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -3047,6 +3047,15 @@ This function is also a bindable command, see ifzman(the section `Bindable Commands' below)\ ifnzman(noderef(Bindable Commands)). ) +findex(_extensions) +item(tt(_extensions))( +If the cursor follows the string `tt(*.)', filename extensions are +completed. The extensions are taken from files in current directory or a +directory specified at the beginning of the current word. For exact matches, +completion continues to allow other completers such as tt(_expand) to +expand the pattern. The standard tt(add-space) and tt(prefix-hidden) +styles are observed. +) findex(_history) item(tt(_history))( Complete words from the shell's command history. This completer -- cgit 1.4.1 From 3c25cb29aba4d4c1a907aa29db48c36d8dbac18e Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 19 Jan 2014 16:24:40 +0100 Subject: 32289: Doc: Add zsh version to footer in HTML documentation. --- .gitignore | 1 + ChangeLog | 4 ++++ Doc/Makefile.in | 10 ++++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) (limited to 'ChangeLog') diff --git a/.gitignore b/.gitignore index 5fd574b1f..4ae315baa 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ Doc/intro.a4.ps Doc/intro.us.pdf Doc/intro.us.ps Doc/version.yo +Doc/texi2html.conf Doc/zsh*.1 Doc/zsh.texi Doc/zsh.info* diff --git a/ChangeLog b/ChangeLog index 806b14cc7..91967edea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-03-03 Simon Ruderich + + * 32289: Doc: Add zsh version to footer in HTML documentation. + 2014-03-03 Oliver Kiddle * 32441: Completion/Base/Completer/_extensions, Doc/Zsh/compsys.yo: diff --git a/Doc/Makefile.in b/Doc/Makefile.in index af0a2b5da..c86f34947 100644 --- a/Doc/Makefile.in +++ b/Doc/Makefile.in @@ -41,7 +41,8 @@ LN_S = @LN_S@ MAKEINFO = makeinfo TEXI2DVI = texi2dvi DVIPS = dvips -TEXI2HTML = @TEXI2HTML@ --output . --ifinfo --split=chapter --node-files +TEXI2HTML = @TEXI2HTML@ --output . --ifinfo --split=chapter --node-files \ + --init-file $(sdir)/texi2html.conf .SUFFIXES: .yo .1 @@ -159,7 +160,7 @@ zsh_a4.ps: zsh.dvi html: zsh_toc.html .PHONY: html -zsh_toc.html: $(sdir)/zsh.texi +zsh_toc.html: $(sdir)/zsh.texi $(sdir)/texi2html.conf $(TEXI2HTML) $(sdir)/zsh.texi zshall.1: zsh.yo @@ -248,6 +249,10 @@ version.yo: $(sdir_top)/Config/version.mk echo 'IFDEF(DECWSLEVEL)(DECWSLEVEL())(ENDDEF())#' | tr '#' '\\'; \ ) > $(sdir)/version.yo +texi2html.conf: $(sdir_top)/Config/version.mk + echo '$$PRE_BODY_CLOSE = "Zsh version $(VERSION), released on $(VERSION_DATE).";' \ + > $(sdir)/$@ + Zsh/modlist.yo: $(MODDOCSRC) ( \ echo "startitem()"; \ @@ -388,6 +393,7 @@ clean-here: rm -f *.aux *.cp *.cps *.fn *.fns *.ky *.log rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs rm -rf infodir + rm -f texi2html.conf .PHONY: clean-here distclean-here: clean-here -- cgit 1.4.1