* Dollars expansion in Eshell
@ 2013-07-31 1:08 Xue Fuqiao
0 siblings, 0 replies; only message in thread
From: Xue Fuqiao @ 2013-07-31 1:08 UTC (permalink / raw
To: help-gnu-emacs
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-31 1:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-31 1:08 Dollars expansion in Eshell Xue Fuqiao
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.