diff options
author | Peter Stephenson <p.stephenson@samsung.com> | 2019-01-08 14:19:19 +0000 |
---|---|---|
committer | Peter Stephenson <p.stephenson@samsung.com> | 2019-01-08 14:19:19 +0000 |
commit | 88ad890c051648d62b9f12227ebc2adde44e9e66 (patch) | |
tree | a27cabe64e3935eab8a3d7d98c80a28b509fa728 | |
parent | 325fceab3b4ffa871777bacc420e0e8efcb0afb9 (diff) | |
download | zsh-88ad890c051648d62b9f12227ebc2adde44e9e66.tar.gz zsh-88ad890c051648d62b9f12227ebc2adde44e9e66.tar.xz zsh-88ad890c051648d62b9f12227ebc2adde44e9e66.zip |
users/23829: add and coument file-split-chars style
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Completion/Unix/Type/_path_files | 5 | ||||
-rw-r--r-- | Doc/Zsh/compsys.yo | 10 |
3 files changed, 20 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index df09afd95..829f699f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2019-01-08 Peter Stephenson <p.stephenson@samsung.com> + + * users/23829: Completion/Unix/Type/_path_files, + Doc/Zsh/compsys.yo: Add and document file-split-chars style. + 2018-01-05 dana <dana@dana.is> * unposted: Config/version.mk, NEWS: Update for 5.6.2-test-3 diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files index 9fa6ae9fc..1021c34e6 100644 --- a/Completion/Unix/Type/_path_files +++ b/Completion/Unix/Type/_path_files @@ -2,6 +2,11 @@ local -a match mbegin mend +local splitchars +if zstyle -s ":completion:${curcontext}:" file-split-chars splitchars; then + compset -P "*[${(q)splitchars}]" +fi + # Look for glob qualifiers. Do this first: if we're really # in a glob qualifier, we don't actually want to expand # the earlier part of the path. We can't expand inside diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index a5a9e5b5d..ba49fe298 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -1568,6 +1568,16 @@ contains the string `tt(follow)', timestamps are associated with the targets of symbolic links; the default is to use the timestamps of the links themselves. ) +kindex(file-split-chars, completion style) +item(tt(file-split-chars))( +A set of characters that will cause em(all) file completions for +the given context to be split at the point where any of the characters +occurs. A typical use is to set the style to tt(:); then everything +up to and including the last tt(:) in the string so far is ignored when +completing files. As this is quite heavy-handed, it is usually +preferable to update completion functions for contexts where this +behaviour is useful. +) kindex(filter, completion style) item(tt(filter))( The tt(ldap) plugin of email address completion (see tt(_email_addresses)) uses |