From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12395 invoked by alias); 3 Dec 2014 21:16:54 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19489 Received: (qmail 10446 invoked from network); 3 Dec 2014 21:16:52 -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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:content-type:mime-version :subject:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to; s=smtpout; bh=BZ2pnhP+zFzQ9xu6w++gD83 P5gM=; b=eAdI3lDKOjSL+xJEQDl+x30/mTCd/EQ/dh4ShceWM0OhPYwLD7FX2Dw nGS6kPLnxYZhm39To6X573A/r0pOD+nZEFsgwZbTDm0EicxBuewny6Gde9wzPOh2 BnEWmoKPJA49xfE/4+TfNHT2xDnzvBj0SuedL91TEu2t8/jrlF9Y= X-Sasl-enc: 2CjweVhUztO0lGtF4QUX26asXt2Z6Lfh3rBPq/qZoPUI 1417641411 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: triviality with prompts From: =?windows-1252?Q?Lawrence_Vel=E1zquez?= In-Reply-To: <547F385B.3070405@eastlink.ca> Date: Wed, 3 Dec 2014 16:16:50 -0500 Cc: zsh-users@zsh.org Content-Transfer-Encoding: 7bit Message-Id: References: <547E568C.6070607@eastlink.ca> <141202190200.ZM31930@torch.brasslantern.com> <547E9158.6050103@eastlink.ca> <9CD0DDE8-21AB-4EA3-A69F-9B338ECC83F1@macports.org> <547F385B.3070405@eastlink.ca> To: Ray Andrews X-Mailer: Apple Mail (2.1993) On Dec 3, 2014, at 11:20 AM, Ray Andrews wrote: > Thanks, that's a nice summary. It's especially nice of it to mention > the $'foo' gotcha, which is ignored in other docs. Just when I thought > I knew what a single quote was :( It's not really a gotcha; the dollar sign frequently has special meaning in shell scripts. As a rule of thumb, you shouldn't ever assume that a "$" is a literal. > But the zshbuiltins page, under 'print' doesn't go into any detail about > this $'foo' form. zshmisc(1) says: A string enclosed between `$'' and `'' is processed the same way as the string arguments of the print builtin, and the resulting string is considered to be entirely quoted. Which means you want to figure out how the print builtin treats its string arguments, from zshbuiltins(1): With no flags or with the flag `-', the arguments are printed on the standard output as described by echo, with the following differences... Then you probably also want to look up what echo does: Write each arg on the standard output, with a space separating each one. If the -n flag is not present, print a newline at the end. echo recognizes the following escape sequences... vq