From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6217 invoked from network); 11 Sep 2006 19:11:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 Sep 2006 19:11:47 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 12930 invoked from network); 11 Sep 2006 19:11:32 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Sep 2006 19:11:32 -0000 Received: (qmail 17381 invoked by alias); 11 Sep 2006 19:11:22 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10707 Received: (qmail 17370 invoked from network); 11 Sep 2006 19:11:22 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 Sep 2006 19:11:22 -0000 Received: (qmail 11531 invoked from network); 11 Sep 2006 19:11:21 -0000 Received: from mx2-3.spamtrap.magma.ca (209.217.78.162) by a.mx.sunsite.dk with SMTP; 11 Sep 2006 19:11:20 -0000 Received: from mail4.magma.ca (mail4.internal.magma.ca [10.0.10.14]) by mx2-3.spamtrap.magma.ca (8.13.1/8.13.1) with ESMTP id k8BJBHiC005102 for ; Mon, 11 Sep 2006 15:11:17 -0400 Received: from princo.homelinux.org (ottawa-hs-209-217-93-54.d-ip.magma.ca [209.217.93.54]) by mail4.magma.ca (Magma's Mail Server) with ESMTP id k8BJBG6o015836 for ; Mon, 11 Sep 2006 15:11:17 -0400 Received: from jrdavid by princo.homelinux.org with local (Exim 3.36 #1 (Debian)) id 1GMrBc-0008P3-00 for ; Mon, 11 Sep 2006 15:11:16 -0400 Date: Mon, 11 Sep 2006 15:11:16 -0400 From: Jean-Rene David To: zsh-users@sunsite.dk Subject: Re: alias -- do not pass args Message-ID: <20060911191116.GA31975@princo> Mail-Followup-To: zsh-users@sunsite.dk References: <20060911185045.GA15092@localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20060911185045.GA15092@localdomain> User-Agent: Mutt/1.5.13 (2006-08-11) X-magma-MailScanner-Information: Magma Mailscanner Service X-magma-MailScanner: Clean * Roman Cheplyaka [2006.09.11 15:00]: > I want to define alias which would /not/ pass its args to program. > E.g. > $ alias foo='echo lol' > $ foo a b > should just print lol, not "lol a b". How can I do this? Well in this case the alias does not pass its args to the program. The alias is just expanded and the whole line is passed to 'echo' by the shell. You could obtain what you want with a shell function: % foo() { echo lol; } % foo a b lol % It doesn't make much sense to do it with an alias anyway. Unless I'm missing something... -- JR