From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1301 invoked by alias); 28 Jul 2011 23:52: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: 16149 Received: (qmail 5491 invoked from network); 28 Jul 2011 23:52:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 74.125.82.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:from:reply-to:to:date:in-reply-to:references:content-type :x-mailer:content-transfer-encoding:message-id:mime-version; bh=X1z6GcGIkiZrinx0M+1uzYCeGtmpOqtDD2+4iNSJzuE=; b=elDcArr5A5Rp37Oq1m+wVBifGoZu5Rno3+7yJloVZYBOz1Vx0GIAmARwLSECTz0yAD UTrm0ZX6kkR5PKTktcXkw9Hm/QSsJKkC1GSevgP0uD6HbskiYeSPbkmQtgW4xLzdJH4F 7VeF320y9zJq51wkdPEILyLYIsCWF9MjzqgnI= Subject: Re: how to refer to basename of $0 From: Tomasz Moskal Reply-To: ramshackle.industries@gmail.com To: zsh-users@zsh.org Date: Fri, 29 Jul 2011 00:54:01 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.2 Content-Transfer-Encoding: 7bit Message-ID: <1311897243.1442.1.camel@localhost.localdomain> Mime-Version: 1.0 On Thu, 2011-07-28 at 18:55 -0400, TJ Luoma wrote: > I have a ".source" file that I use to setup some functions and > variables for use in my scripts, and one of the things it does it > this: > > NAME=`basename $0` > name="`basename $0`" echo $name