From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70 invoked by alias); 7 Sep 2016 18:31:54 -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: 39228 Received: (qmail 13608 invoked from network); 7 Sep 2016 18:31:54 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm0-f41.google.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(74.125.82.41):SA:0(0.0/5.0):. Processed in 0.233872 secs); 07 Sep 2016 18:31:54 -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=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: tgyurci@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 74.125.82.41 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=JE7/xzTTIdXH04KUlyNhBPbQbsCJIIjHCZm/FI4UKkg=; b=fyssrJCbl4EDV26UNeO6gm/HBMZjE18/6Q2nS4V7nJn9fYjsVE1yI+k5pc+aMCiHjA vlM7yddkczezC0RksaPy8pqt4UOrvg9QC+p1SpKMVOk9LTJY4WXs6M5IZ5gsaTnSm9vJ Onqst9r72dBOQz5PR5kGBmuFLMymUi7/EtJE4kReHXWlfx6njkVi9GoO8RJLSKe+CA4T E5e9vb2GEQZ+7R7LmYfzgATmVo5EucyWqHa7fm7SVFBxl+UMaNn35syke3XFtrjBHJ86 W8mRY13qA/dxpUKGUuy6dxT3pQWTE5efghZTgcmL1rulQGh9W4DrGoKlYOvqdIaDknJM s3pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=JE7/xzTTIdXH04KUlyNhBPbQbsCJIIjHCZm/FI4UKkg=; b=j71d+ARWKmqUjZiPTZRL5xgMjlW29J4zqPHryvloLh+ZlCH1isKx7NlXxrWNH58kLl tPQ1DAITauvvOG5uM0ss5dn7qO93doLR19MUEZvgRXOGQIgkXYxyd8hYvydcqcmS+DmW zQul+WozhY3NkrUsqM6buf8qLc4UC/uSVYvmfnUyYZt7dtJPbIfU9crkJDQ3VITDM9S6 UHXDWk7q0Z88qYQcBM9u2EE1awxUSf/oi2M2Dm4jLQ4Anuwdoa/TxrSPBYiPU16X32Tz CV++3aHK7duSMrQKJi+2ze3+V/uzYe65nQEG6ryttpbAZzyqHB6U5bc7xhDS3xqM/89E pOrQ== X-Gm-Message-State: AE9vXwN9EC0gapclP7J2Ptg7cYKJf8yHYEJ/fQOk4uRNLFHyHwJuumwhnFXTICeiWIhvIw== X-Received: by 10.28.140.10 with SMTP id o10mr16466024wmd.36.1473110955858; Mon, 05 Sep 2016 14:29:15 -0700 (PDT) From: =?UTF-8?q?Teubel=20Gy=C3=B6rgy?= To: zsh-workers@zsh.org Subject: [PATCH] Use == in expressions instead of the deprecated = Date: Mon, 5 Sep 2016 23:27:54 +0200 Message-Id: <20160905212754.24998-1-tgyurci@gmail.com> --- Doc/Zsh/compsys.yo | 2 +- Doc/Zsh/cond.yo | 2 +- Doc/Zsh/contrib.yo | 2 +- Doc/Zsh/expn.yo | 18 +++++++++--------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index 8c7ef0f..060a5c5 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -2532,7 +2532,7 @@ current prefix is empty, is a single `tt(.)', or consists only of a path beginning with `tt(../)'. Otherwise the value is `false'. example(zstyle -e ':completion:*' special-dirs \ - '[[ $PREFIX = LPAR()../RPAR()#LPAR()|.|..RPAR() ]] && reply=LPAR()..RPAR()') + '[[ $PREFIX == LPAR()../RPAR()#LPAR()|.|..RPAR() ]] && reply=LPAR()..RPAR()') ) kindex(squeeze-slashes, completion style) item(tt(squeeze-slashes))( diff --git a/Doc/Zsh/cond.yo b/Doc/Zsh/cond.yo index 3d369fb..e87c1e6 100644 --- a/Doc/Zsh/cond.yo +++ b/Doc/Zsh/cond.yo @@ -248,7 +248,7 @@ tt($LPAR()LPAR())var(...)tt(RPAR()RPAR()). For example, the following: -example([[ ( -f foo || -f bar ) && $report = y* ]] && print File exists.) +example([[ ( -f foo || -f bar ) && $report == y* ]] && print File exists.) tests if either file tt(foo) or file tt(bar) exists, and if so, if the value of the parameter tt(report) begins with `tt(y)'; if the complete diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 63df292..cf3a398 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -540,7 +540,7 @@ at run time: example(zstyle -e ':chpwd:*' recent-dirs-file pick-recent-dirs-file pick-recent-dirs-file+LPAR()RPAR() { - if [[ $PWD = ~/text/writing+LPAR()|/*RPAR() ]]; then + if [[ $PWD == ~/text/writing+LPAR()|/*RPAR() ]]; then reply=(~/.chpwd-recent-dirs-writing) else reply=(+) diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo index ecb1877..40932fe 100644 --- a/Doc/Zsh/expn.yo +++ b/Doc/Zsh/expn.yo @@ -967,12 +967,12 @@ for this purpose since quotes are not stripped from non-pattern characters by tt(GLOB_SUBST). In other words, example(pattern=${(q)str} -[[ $str = ${~pattern} ]]) +[[ $str == ${~pattern} ]]) works if tt($str) is `tt(a*b)' but not if it is `tt(a b)', whereas example(pattern=${(b)str} -[[ $str = ${~pattern} ]]) +[[ $str == ${~pattern} ]]) is always true for any possible value of tt($str). ) @@ -1228,7 +1228,7 @@ that follow tt(~) within the same set of parentheses. Compare with tt(~) outside parentheses, which forces the entire substituted string to be treated as a pattern. Hence, for example, -example([[ "?" = ${(~j.|.)array} ]]) +example([[ "?" == ${(~j.|.)array} ]]) treats `tt(|)' as a pattern and succeeds if and only if tt($array) contains the string `tt(?)' as an element. The tt(~) may be @@ -1829,20 +1829,20 @@ example(zsh_directory_name+LPAR()RPAR() { emulate -L zsh setopt extendedglob local -a match mbegin mend - if [[ $1 = d ]]; then + if [[ $1 == d ]]; then # turn the directory into a name - if [[ $2 = (#b)(/home/pws/perforce/)([^/]##)* ]]; then + if [[ $2 == (#b)(/home/pws/perforce/)([^/]##)* ]]; then typeset -ga reply reply=(p:$match[2] $(( ${#match[1]} + ${#match[2]} )) ) else return 1 fi - elif [[ $1 = n ]]; then + elif [[ $1 == n ]]; then # turn the name into a directory [[ $2 != (#b)p:(?*) ]] && return 1 typeset -ga reply reply=(/home/pws/perforce/$match[1]) - elif [[ $1 = c ]]; then + elif [[ $1 == c ]]; then # complete names local expl local -a dirs @@ -2206,7 +2206,7 @@ parentheses can be referenced. For example, example(foo="a string with a message" -if [[ $foo = (a|an)' '(#b)(*)' '* ]]; then +if [[ $foo == (a|an)' '(#b)(*)' '* ]]; then print ${foo[$mbegin[1],$mend[1]]} fi) @@ -2224,7 +2224,7 @@ The numbering of backreferences strictly follows the order of the opening parentheses from left to right in the pattern string, although sets of parentheses may be nested. There are special rules for parentheses followed by `tt(#)' or `tt(##)'. Only the last match of the parenthesis is -remembered: for example, in `tt([[ abab = (#b)([ab])# ]])', only the final +remembered: for example, in `tt([[ abab == (#b)([ab])# ]])', only the final `tt(b)' is stored in tt(match[1]). Thus extra parentheses may be necessary to match the complete segment: for example, use `tt(X+LPAR()(ab|cd)#+RPAR()Y)' to match -- 2.9.3