From 72b56dc45866bdd645e92d32ef4dd0aacd8da792 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Tue, 17 Jul 2001 09:04:29 +0000 Subject: add preserve-prefix style to keep pathname prefix unchanged (15400) --- ChangeLog | 6 ++++++ Completion/Zsh/Command/_zstyle | 5 +++++ Doc/Zsh/compsys.yo | 10 ++++++++++ 3 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5a62df781..48c455d29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-07-17 Sven Wischnowsky + + * 15400: Completion/Unix/Type/_path_files, + Completion/Zsh/Command/_zstyle, Doc/Zsh/compsys.yo: add + preserve-prefix style to keep pathname prefix unchanged + 2001-07-13 Andrej Borsenkow * 15278 (Sven), 15390: Completion/Unix/Command/_mount, diff --git a/Completion/Zsh/Command/_zstyle b/Completion/Zsh/Command/_zstyle index 003ec4d9f..37590f0d9 100644 --- a/Completion/Zsh/Command/_zstyle +++ b/Completion/Zsh/Command/_zstyle @@ -75,6 +75,7 @@ styles=( ports c:_ports prefix-hidden c:bool prefix-needed c:bool + preserve-prefix c:preserve-prefix range c: regular c:bool remote-access c:bool @@ -304,6 +305,10 @@ while [[ -n $state ]]; do _wanted values expl 'insert unambiguous string' compadd true false pattern ;; + preserve-prefix) + _message 'pattern matching prefix to keep' + ;; + urgh) _wanted values expl no compadd no false off 0 ;; diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index aedad700d..c5260245a 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -1834,6 +1834,16 @@ all. The default style for this style is `true'. ) +kindex(preserve-prefix, completion style) +item(tt(preserve-prefix))( +This style is used when completing path names. Its value should be a +pattern matching an initial prefix of the word to complete that should +be left unchanged under all circumstances. For example, on some Unices +an initial `tt(//)' (double slash) has a special meaning and hence +should be kept. For that one could set this style to the string +`tt(//)'. As another example, setting this style to `tt(?:/)' under +Cygwin would allow completion after `tt(a:/...)' and the like. +) kindex(range, completion style) item(tt(range))( This is used by the tt(_history) completer and the -- cgit 1.4.1