zsh-users
 help / color / mirror / code / Atom feed
From: "Szekeres István" <istvan.szekeres@pulsussoft.hu>
To: Zsh list <zsh-users@sunsite.dk>
Subject: parameter expansion question
Date: Sun, 18 Jan 2004 01:28:52 +0100	[thread overview]
Message-ID: <1074385732.8078.9.camel@localhost> (raw)

Hello,

I have a problem with parameter expansion, could you please take a look
at it?

I try to do the following:

print_em ()
{
	echo 1=$1 2=$2 3=$3
}

#this is ok, it prints 1=a 2= 3=b
print_em "a" "" "b"

#this is NOT ok, it prints 1=a 2=b 3=
foo='a::b'
print_em ${(s/:/)foo}

It seems like in the second case the empty string is not passed as the
2nd parameter. How to specify the expansion so it will pass the empty
string just like in the first example?

Thanks in advance,
Istvan







             reply	other threads:[~2004-01-18  0:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-18  0:28 Szekeres István [this message]
2004-01-18  1:54 ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2003-01-18 23:32 Le Wang
2003-01-19  6:33 ` Bart Schaefer
2003-01-19 22:33   ` Le Wang

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=1074385732.8078.9.camel@localhost \
    --to=istvan.szekeres@pulsussoft.hu \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

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