From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12589 invoked by alias); 22 Sep 2016 11:44:39 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39410 Received: (qmail 25210 invoked from network); 22 Sep 2016 11:44:39 -0000 X-Qmail-Scanner-Diagnostics: from out2-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.26):SA:0(0.0/5.0):. Processed in 0.62251 secs); 22 Sep 2016 11:44:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:message-id:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=y5I9xb2czQb9ya07Ml16P3jZzLo=; b=GUN72P FKM8hEAaFB8Se8MXLL17tjH/pEyopcXZHmEe7/KIw/k/Bf8dJcjwJd1D4567pGDT NnZr+Q3YfaRptZKT+SyGesJwsv5w2bIdy3U4IllPengXtzq3X9/8Py6rX+CdwaN7 L3w5dVFzlctIKcx4cRU1IR0XyqFAlbrcKHA80= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-sasl-enc:x-sasl-enc; s=smtpout; bh=y5I9xb2czQb9ya07Ml16P3jZzL o=; b=bIaUGNr9pkA+aRm8y+1BUJ5s2NY29HaUU7SJHUtwgTJwExBTAr5ZDgXuWm p1egseWXftrBGePOm0As86FMTSd1B3IrCncfGepr43WhHdizeRiVOTSmx3QJilH3 W+KP5cCqTpwdynpIP91IXAmCCYnFh0e4n1E2KDmeHp44Mc8WY= X-Sasl-enc: Z+GY5AKHbUskln9beP5cio1AJ9WC5XF6ZXQm51Waq8/k 1474544666 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH] Fix unintentional history modifiers. Date: Thu, 22 Sep 2016 11:43:17 +0000 Message-Id: <1474544597-13684-1-git-send-email-danielsh@fujitsu.shahaf.local2> X-Mailer: git-send-email 2.1.4 --- The _dates one worked even before this patch (!); I haven't investigated why. Daniel Completion/Darwin/Type/_retrieve_mac_apps | 4 ++-- Completion/Unix/Command/_dsh | 2 +- Completion/Unix/Type/_dates | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Completion/Darwin/Type/_retrieve_mac_apps b/Completion/Darwin/Type/_retrieve_mac_apps index ba15577..f24d36c 100644 --- a/Completion/Darwin/Type/_retrieve_mac_apps +++ b/Completion/Darwin/Type/_retrieve_mac_apps @@ -71,7 +71,7 @@ _retrieve_mac_apps() { # Get application search method typeset retrieve - if ! zstyle -s ":completion:*:*:$service:commands" search-method retrieve + if ! zstyle -s ":completion:*:*:${service}:commands" search-method retrieve then if [[ -d /.Spotlight-V100 ]]; then # / is indexed to use Spotlight @@ -80,7 +80,7 @@ _retrieve_mac_apps() { # Fall back to the old way retrieve=_mac_apps_old_retrieve fi - zstyle ":completion:*:*:$service:commands" search-method $retrieve + zstyle ":completion:*:*:${service}:commands" search-method $retrieve fi # Get root directories to search applications diff --git a/Completion/Unix/Command/_dsh b/Completion/Unix/Command/_dsh index 8c5c232..fc76800 100644 --- a/Completion/Unix/Command/_dsh +++ b/Completion/Unix/Command/_dsh @@ -25,7 +25,7 @@ _arguments -s -C -S \ '*::args: _normal' && return if [[ $state = groups ]]; then - if ! zstyle -s ":completion:$curcontext:dsh-groups" dsh-groups grp; then + if ! zstyle -s ":completion:${curcontext}:dsh-groups" dsh-groups grp; then [[ -e ~/.dsh/group ]] && grp="~/.dsh/group" || return 1 fi _path_files -W ~/.dsh/group && return diff --git a/Completion/Unix/Type/_dates b/Completion/Unix/Type/_dates index e4fa62e..0af10eb 100644 --- a/Completion/Unix/Type/_dates +++ b/Completion/Unix/Type/_dates @@ -22,10 +22,10 @@ local future mlabel mfmt mlabels zparseopts -D -K -E f:=format F=future (( future = $#future ? 1 : -1 )) -zstyle -s ':completion:$curcontext:dates' date-format userformat +zstyle -s ":completion:${curcontext}:dates" date-format userformat format=${userformat:-${format[2]:-%F}} -zstyle -a ':completion:$curcontext:dates' max-matches-length r +zstyle -a ":completion:${curcontext}:dates" max-matches-length r for ri in $r; do [[ $ri = [0-9]##% ]] && (( ri = LINES * .${ri%%%} )) (( ri < rows )) && (( rows=ri ))