zsh-users
 help / color / mirror / code / Atom feed
From: Jerry Peek <jpeek@jpeek.com>
To: zsh-users@sunsite.auc.dk
Subject: Two esoteric zsh questions
Date: Tue, 05 Sep 2000 13:21:52 -0700	[thread overview]
Message-ID: <24818.968185312@jpeek.com> (raw)

(Is *any* zsh question esoteric?  Or are *all* zsh questions? ;-)
Here's a question that might be a bug, then a follow-up "how to".
I'm using 3.0.7 on Linux (Red Hat 6.2) right now.

----------------------------------------------------------------------

1) Can anyone explain the difference in the following two cases?  The
first sets a shell variable; the second sets an environment variable.
In the second, I have to quote the `who`:

	% whoson=`who`
	%

	% export WHOSON=`who`
	zsh: not an identifier: 06:56
	% export WHOSON="`who`"
	%

(The first line of the "who" output ends with 06:56.)

I looked through the FAQ and scanned through a change list... but
didn't spot changes in more recent versions, so I'm asking the list.
Is the difference a bug, side effect, or feature?

----------------------------------------------------------------------

2) I wanted to compare the values of $whoson and $WHOSON.  I couldn't
think of a way to use two <<< operators, so I tried this kludge:

	% diff - <(echo $WHOSON) <<<$whoson
	%

Does anyone know a cleaner way to do that?

[BTW, this next mess wasn't as simple but it worked fine too:

	% diff - <(cat <<<$WHOSON) <<<$whoson

zsh is amazing...]

----------------------------------------------------------------------

Thanks!

--Jerry Peek, jpeek@jpeek.com
  http://www.jpeek.com/

PS: I mentioned last spring that the third edition of Unix Power Tools
will cover zsh -- and asked if the new shell would be ready by August
so we could put it on the book's CD-ROM.  FYI, due to some scheduling
problems, I'm still working on the book; the target date is early 2001.)


             reply	other threads:[~2000-09-08 19:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-05 20:21 Jerry Peek [this message]
2000-09-08 20:19 ` Zefram
2000-09-08 22:25 ` Bart Schaefer

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=24818.968185312@jpeek.com \
    --to=jpeek@jpeek.com \
    --cc=zsh-users@sunsite.auc.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).