From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14214 invoked by alias); 16 Mar 2018 17:26:20 -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: List-Unsubscribe: X-Seq: 42470 Received: (qmail 17775 invoked by uid 1010); 16 Mar 2018 17:26:20 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm0-f66.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.66):SA:0(-1.9/5.0):. Processed in 1.126821 secs); 16 Mar 2018 17:26:20 -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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: stephane.chazelas@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GBpVLMuu9m04vOTRoxV8qarg881ohfQJT3Ahi781zy0=; b=dwmV9AjH49u23Yf1BDLKlIImmGV63K6RFcwdndwAlYI8KokFfs/2eqmCVrWIiMBmS2 9Ob3vNzJVrUYZZ7BoU6MtCEMN2vE5idjkDdYQW5eM7K2aDP/fcEtB85jpAZ+4ZCESMqL wg/xQpDAwb4gByg6JO2nPx/s4lnJvM5o1ryPgi26UgtMnZ+BL7wEN8dDMGka7/UZo9eI fKj8FHuRdPjPvWO9D9bkMESljDv7HCeBgzgOPDISN+hOgYdrI1oD6ACxMuUfMlK/1Vj8 +2Ev+gYQtButckW3cJY0J2q7EmV781KwY7i9fqTOWfl4HsM1khHSKKmIdTPx+st2Iadv WG+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=GBpVLMuu9m04vOTRoxV8qarg881ohfQJT3Ahi781zy0=; b=kJlpEGMjkp3lEKXzvBq9KkB+GPly1REG3xq7E88ttmaI0pqpOj7+mqgan/v6VSx4Bm cF2SHTfBbIEPEK8xW76STl8gVqzNgZruK7fJndqfFb7tDSMcrgk/7ybox2uYe+OTw+KG 5Gx5TX6rSwy9P91gOCNXN+qJS3rQAou4lTiB/+vkp0x0G0dBwgzo2VYi1lh0glpf8Ly7 K3CQ1Dey5QO9DWqUvhtcDY85Fbwpn/gSI6Mgt4fWcbGyuHTlD6iLfKj+FwOShSuCY/MC 4HsQuxS2muDCDQPTX5zfeKxrBX2FTrtoQt7zoMzJ4Lvbf+XoxGz4vd0vk21nKGhU7VaS sS6g== X-Gm-Message-State: AElRT7G9HyzsY7wH9wxVtrqLerdnS4lHnFr4ioN4pYK6zk6/NQVSM0Yj 2t9lFWvR/uyAU5iJxskwK21XoQ== X-Google-Smtp-Source: AG47ELtisirtWqhqLsrezYDKQYBhCfCSP8aRn+rw+ApFesBMnZ7KkFTUboDuzeeYrh0BJdxOhDD8cQ== X-Received: by 10.28.181.83 with SMTP id e80mr2212291wmf.147.1521221175821; Fri, 16 Mar 2018 10:26:15 -0700 (PDT) Date: Fri, 16 Mar 2018 17:26:13 +0000 From: Stephane Chazelas To: Martijn Dekker , zsh-workers@zsh.org Subject: Re: [doc] "sh_word_split nothing to do with word splitting"? Message-ID: <20180316172613.GB23397@chaz.gmail.com> Mail-Followup-To: Martijn Dekker , zsh-workers@zsh.org References: <20180311094458.GA6450@chaz.gmail.com> <180311112407.ZM2303@torch.brasslantern.com> <20180311205348.GC6450@chaz.gmail.com> <20180312074329.GA6416@chaz.gmail.com> <20180312080727.GB6416@chaz.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180312080727.GB6416@chaz.gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) So, how about this new take at it? Renders (in info) as: SH_WORD_SPLIT (-y) Causes $IFS field splitting to be performed on unquoted parameter expansions in addition to command substitutions. Note that contrary to POSIX shells, field splitting is still not performed on unquoted arithmetic expansions. Like in other Bourne-like shells, field splitting is only performed in contexts where several words may be expected, such as in arguments to simple commands or inline functions, array assignments and for loop word lists. If the MULTIOS option is enabled, it is also performed in the targets of file redirections (except for the read+write ones). (See *note Parameter Expansion:: and *note Redirection::). diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo index 25b3d57..97782de 100644 --- a/Doc/Zsh/options.yo +++ b/Doc/Zsh/options.yo @@ -2314,9 +2314,16 @@ pindex(NOSHWORDSPLIT) cindex(field splitting, sh style) cindex(sh, field splitting style) item(tt(SH_WORD_SPLIT) (tt(-y)) )( -Causes field splitting to be performed on unquoted parameter expansions. -Note that this option has nothing to do with word splitting. -(See noderef(Parameter Expansion).) +Causes tt($IFS) field splitting to be performed on unquoted parameter +expansions in addition to command substitutions. Note that contrary to +POSIX shells, field splitting is still not performed on unquoted +arithmetic expansions. Like in other Bourne-like shells, field splitting +is only performed in contexts where several words may be expected, such +as in arguments to simple commands or inline functions, array +assignments and for loop word lists. If the tt(MULTIOS) option is +enabled, it is also performed in the targets of file redirections +(except for the read+write ones). (See noderef(Parameter Expansion) and +noderef(Redirection)). ) pindex(TRAPS_ASYNC) pindex(NO_TRAPS_ASYNC)