From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xue Fuqiao Newsgroups: gmane.emacs.help Subject: Dollars expansion in Eshell Date: Wed, 31 Jul 2013 09:08:51 +0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1375232947 24185 80.91.229.3 (31 Jul 2013 01:09:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Jul 2013 01:09:07 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 31 03:09:07 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V4KuX-00052U-Kr for geh-help-gnu-emacs@m.gmane.org; Wed, 31 Jul 2013 03:09:05 +0200 Original-Received: from localhost ([::1]:35056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4KuX-0002Yv-0D for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Jul 2013 21:09:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4KuL-0002Yc-R9 for help-gnu-emacs@gnu.org; Tue, 30 Jul 2013 21:08:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4KuK-0007io-Gx for help-gnu-emacs@gnu.org; Tue, 30 Jul 2013 21:08:53 -0400 Original-Received: from mail-ob0-x22d.google.com ([2607:f8b0:4003:c01::22d]:51985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4KuK-0007ib-Ck for help-gnu-emacs@gnu.org; Tue, 30 Jul 2013 21:08:52 -0400 Original-Received: by mail-ob0-f173.google.com with SMTP id ta17so200586obb.18 for ; Tue, 30 Jul 2013 18:08:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=EOLsOGdP+/qQZtGbe8w7/fXismkYUIiptYMXcquiQEw=; b=pO8BJx4h0EgD50EUWjh/QF3ni3zrPemsniXZrVnScU2IZw5IKgvB8uZmRAkPKeAl62 kE/reqPOyYEAhJqJg0LBXNUDRcX5wlQ+Ha9H47oGl2Mcg6045lveQymO79bjvCC75DWz K48e1oJxT0hABp68Tgt14i/jweA26jFxmNJWnUHjq71WkkvJwQ0yfmZ2UdFWsMNfviuW UjgvYRqbIQGtYjC5t6WjbmAFV8r5hX/O0/TO7HeNKDhtwPQINa5a3uPrejdg2rSZi/x8 6WIPLg19rs4mJRhdmiJoIH1Jnt7EXoHgvnpjDOktBoXu9C2QBH+jeQPfbeXAVfB+y/W1 qKrQ== X-Received: by 10.50.11.46 with SMTP id n14mr435934igb.15.1375232931908; Tue, 30 Jul 2013 18:08:51 -0700 (PDT) Original-Received: by 10.42.28.3 with HTTP; Tue, 30 Jul 2013 18:08:51 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::22d X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92577 Archived-At: 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") =E2=8F=8E', 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? --=20 Best regards, Xue Fuqiao.