From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28399 invoked by alias); 3 Sep 2014 14:58:28 -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: 33104 Received: (qmail 15245 invoked from network); 3 Sep 2014 14:58:27 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=+Rg09yLWOrrRAIShzTnsxISxUHJOHmnf1nFOyaYft0E=; b=uevD9rPtyn0eIxh62VwFq52yZI6ofWUxll4d3tt1QcFdALN6TRSEV/GHq8MtcXkgmI 29tOCWK2L3FCVUzLs3b3lgb57PbuBQka8tcwG5T8rp7SAV522V2ivrdxQIp5k2QOLkoL m4xdmHWfD72o0qQkaAde0IASElr3zhI6l/PIxXefoZRqtcLL0vWGQXGn9PZTykiAlOtf Ysg+3c3pvKFWImNROi3ZRtWxiDb2EkeADDUrADloYqp0Yj9CkryJXAve9kiCJD+qR9qa M6rIkXpwfhRm8mpjAm5h6VpZ+8VacR7XD5JfWZOGL2+Ou4IcqEEDCHIx7CBHkeZIjjyY WXcg== MIME-Version: 1.0 X-Received: by 10.42.101.77 with SMTP id d13mr20890574ico.53.1409756303599; Wed, 03 Sep 2014 07:58:23 -0700 (PDT) Date: Wed, 3 Sep 2014 10:58:23 -0400 Message-ID: Subject: The ~ parameter expansion flag: bug or misunderstanding From: Clint Hepner To: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary=20cf3010e841b2440f05022a770a --20cf3010e841b2440f05022a770a Content-Type: text/plain; charset=UTF-8 I understand that you can split a parameter value on a fixed string: % print -l ${(s.1.):-a1b1c} a b c My reading of the ~ flag leads me to believe that you can replace the literal string with a pattern, so that % print -l ${(~s.[12].):-a1b2c} a b c However, the ~ flag seems to have no effect, with the parameter string remaining unsplit. -- Clint --20cf3010e841b2440f05022a770a--