zsh-workers
 help / color / mirror / code / Atom feed
* An incompatible behavior from bash?
@ 2022-08-19 22:32 Liu Xin
  2022-08-20  0:39 ` Lawrence Velázquez
  0 siblings, 1 reply; 5+ messages in thread
From: Liu Xin @ 2022-08-19 22:32 UTC (permalink / raw)
  To: zsh-workers

[-- 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.
https://zsh.sourceforge.io/Doc/Release/Expansion.html#Parameter-Expansion

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() {
  var=$1:l
  echo $var
}

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

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-23  5:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-19 22:32 An incompatible behavior from bash? Liu Xin
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

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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