From: Frank Terbeck <ft@bewatermyfriend.org>
To: zsh-workers@zsh.org
Cc: Oliver Kiddle <okiddle@yahoo.co.uk>
Subject: [PATCH 6/6] _baudrates: Make style lookups fit better with the rest of compsys
Date: Sun, 8 May 2016 00:09:16 +0200 [thread overview]
Message-ID: <1462658956-11785-7-git-send-email-ft@bewatermyfriend.org> (raw)
In-Reply-To: <1462658956-11785-1-git-send-email-ft@bewatermyfriend.org>
To quote Oliver Kiddle:
> The original concept with styles was that style's could have fairly
> generic names because the context allows you to select the detailed
> context. So perhaps consider allowing this to work as, for example:
> zstyle ':completion:*:*:screen:*:baud-rates' max-value 9600
---
Completion/Unix/Type/_baudrates | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Completion/Unix/Type/_baudrates b/Completion/Unix/Type/_baudrates
index c1ee3f4..d43b9f1 100644
--- a/Completion/Unix/Type/_baudrates
+++ b/Completion/Unix/Type/_baudrates
@@ -23,9 +23,9 @@
# It is also possible to override the arguments to -f, -u and -l via styles in
# a similar fashion:
#
-# zstyle ':completion:*:*:screen:*' max-baud-rate 9600
-# zstyle ':completion:*:*:screen:*' min-baud-rate 1200
-# zstyle ':completion:*:*:screen:*' baud-rate-filter some_function_name
+# zstyle ':completion:*:*:screen:*:baud-rates' max-value 9600
+# zstyle ':completion:*:*:screen:*:baud-rates' min-value 1200
+# zstyle ':completion:*:*:screen:*:baud-rates' filter some_function_name
local tmp
local -a expl rates
@@ -53,9 +53,9 @@ zstyle -a ":completion:${curcontext}:" baud-rates rates ||
115200 230400 460800 500000 576000 921600
1000000 1152000 1500000 2000000 2500000 3000000 3500000 4000000 )
-zstyle -s ":completion:${curcontext}:" max-baud-rate tmp && opts[-u]=$tmp
-zstyle -s ":completion:${curcontext}:" min-baud-rate tmp && opts[-l]=$tmp
-zstyle -s ":completion:${curcontext}:" baud-rate-filter tmp && opts[-f]=$tmp
+zstyle -s ":completion:${curcontext}:baud-rates" max-value tmp && opts[-u]=$tmp
+zstyle -s ":completion:${curcontext}:baud-rates" min-value tmp && opts[-l]=$tmp
+zstyle -s ":completion:${curcontext}:baud-rates" filter tmp && opts[-f]=$tmp
if (( ${+opts[-u]} )) || (( ${+opts[-l]} )); then
local -i min max
--
2.8.1
prev parent reply other threads:[~2016-05-07 22:09 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-01 1:12 [PATCH] Add completion for picocom utility Frank Terbeck
2016-05-01 3:27 ` Ryan Wilson
2016-05-01 10:57 ` Frank Terbeck
2016-05-01 12:47 ` [PATCH] Refactor baud rate completion Frank Terbeck
2016-05-01 13:14 ` [PATCHv2] " Frank Terbeck
2016-05-01 13:27 ` [PATCHv3] " Frank Terbeck
2016-05-01 22:21 ` Frank Terbeck
2016-05-02 12:55 ` Oliver Kiddle
2016-05-03 21:01 ` Frank Terbeck
2016-05-07 21:53 ` Frank Terbeck
2016-05-11 15:08 ` Oliver Kiddle
2016-05-07 22:09 ` [PATCH 0/6] Update baud rate completion with Oliver's comments in mind Frank Terbeck
2016-05-07 22:09 ` [PATCH 1/6] _baudrate → _baudrates Frank Terbeck
2016-05-07 22:09 ` [PATCH 2/6] _baudrates: Use 2 space indentation Frank Terbeck
2016-05-07 22:53 ` Frank Terbeck
2016-05-07 22:09 ` [PATCH 3/6] Use _baudrates helper instead of _baudrate Frank Terbeck
2016-05-07 22:09 ` [PATCH 4/6] _baudrates: Fit better into the general completion framework Frank Terbeck
2016-05-07 22:09 ` [PATCH 5/6] _cu: Remove old -d option of _baudrates Frank Terbeck
2016-05-07 22:09 ` Frank Terbeck [this message]
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=1462658956-11785-7-git-send-email-ft@bewatermyfriend.org \
--to=ft@bewatermyfriend.org \
--cc=okiddle@yahoo.co.uk \
--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).