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 --- Doc/Zsh/compsys.yo | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Doc') 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 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 'Doc') 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 'Doc') 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