help / color / mirror / code / Atom feed
From: Liu Xin <navy.xliu@gmail.com>
To: zsh-workers@zsh.org
Subject: An incompatible behavior from bash?
Date: Fri, 19 Aug 2022 15:32:28 -0700	[thread overview]
Message-ID: <CAHPdc0kc06epWceF-zLaoan-AdGyuDPept4Exd=T1Q7UPghseA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 541 bytes --]

Hi, Zsh developers,

I think zsh is compatible with bash, but I found one different behavior in
parameter expansion.  In the following example, I guess zsh interprets
"$1:l" as a whole. Is it intentional?  I read the doc but I haven't found
anything about it.

Here is an example, I tried zsh 5.8.1 on both linux and macos. The results
are the same.

% cat t.sh
param_expansion() {
  echo $var

param_expansion hello
% zsh t.sh
% bash t.sh

[-- Attachment #2: Type: text/html, Size: 794 bytes --]

             reply	other threads:[~2022-08-19 22:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19 22:32 Liu Xin [this message]
2022-08-20  0:39 ` Lawrence Velázquez
2022-08-22  7:54   ` Liu Xin
2022-08-22 21:44     ` Bart Schaefer
2022-08-23  5:42       ` Liu Xin

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHPdc0kc06epWceF-zLaoan-AdGyuDPept4Exd=T1Q7UPghseA@mail.gmail.com' \
    --to=navy.xliu@gmail.com \
    --cc=zsh-workers@zsh.org \


* 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


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).