From: arno <arno@renevier.net>
To: zsh-workers@zsh.org
Subject: [PATCH] _setxbmap: fix variants
Date: Sat, 2 Jul 2016 14:18:10 -0700 [thread overview]
Message-ID: <20160702211810.GA25575@gandi.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 775 bytes --]
In _setxkbmap_variant, the script looks for the pattern *xkb_symbols*\"([[:alnum:]])
This prevent variants containing non alphanumeric symbols to be included in the completion. For example,
$ setxkbmap us <Tab>
fails to suggest altgr-intl, classmate-intl, cz_sk_de, dvorak-classic, dvorak-r, intl-unicode, workman-intl, alt-intl, classmate-altgr-intl, dvorak-intl, sun_type6, alt-intl-
unicode, classmate-alt-intl, dvorak-alt-intl and dvorak-l variants
This patch fixes this issue by looking for pattern *xkb_symbols*\"([^\"])
It also replaces # compdef setxkbmap by #compdef setxkbmap. The spurious space prevented the completion to be loaded in the first place.
[-- Attachment #2: setxkbmap.patch --]
[-- Type: text/x-diff, Size: 643 bytes --]
diff --git a/Completion/X/Command/_setxkbmap b/Completion/X/Command/_setxkbmap
index c490a9d..d192cc1 100644
--- a/Completion/X/Command/_setxkbmap
+++ b/Completion/X/Command/_setxkbmap
@@ -1,4 +1,4 @@
-# compdef setxkbmap
+#compdef setxkbmap
# TODO:
# model, option, symbols and types suggestions
@@ -90,7 +90,7 @@ _setxkbmap_variant () {
fi
lines=("${(f)$(< ${file})}")
- variants=(${${${(M)lines:#*xkb_symbols*\"([[:alnum:]])##\"*}##*xkb_symbols([^\"])##\"}%%\"*})
+ variants=(${${${(M)lines:#*xkb_symbols*\"([^\"])##\"*}##*xkb_symbols([^\"])##\"}%%\"*})
_wanted variant expl 'variant' compadd -a variants
reply other threads:[~2016-07-02 21:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160702211810.GA25575@gandi.net \
--to=arno@renevier.net \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).