From: Xue Fuqiao <xfq.free@gmail.com>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Dollars expansion in Eshell
Date: Wed, 31 Jul 2013 09:08:51 +0800 [thread overview]
Message-ID: <CAAF+z6HuN7d5yYqC8hV+ipUv2D0F7FD1QX848X5iUj_OdhA5YA@mail.gmail.com> (raw)
Hi,
I'm learning the dollars expansion of Eshell now. In (info "(eshell)
Dollars Expansion"):
`$var[i]'
Expands to the `i'th element of the value bound to `var'. If the
value is a string, it will be split at whitespace to make it a
list. Again, raises an error if the value is not a sequence.
I typed `M-: (setq str "ls date info") ⏎', then entered Eshell:
--8<---------------cut here---------------start------------->8---
~ $ $str
ls date info: command not found
--8<---------------cut here---------------end--------------->8---
Right. But:
--8<---------------cut here---------------end--------------->8---
~ $ $str[0]
nil: command not found
~ $ $str[1]
nil: command not found
--8<---------------cut here---------------end--------------->8---
Why nil? I must have got something wrong. Can anyone point me in the
right direction?
--
Best regards, Xue Fuqiao.
reply other threads:[~2013-07-31 1:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=CAAF+z6HuN7d5yYqC8hV+ipUv2D0F7FD1QX848X5iUj_OdhA5YA@mail.gmail.com \
--to=xfq.free@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.