bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: magic needed: alias concatenation of $1


From: Paul Jarc
Subject: Re: magic needed: alias concatenation of $1
Date: Fri, 03 May 2002 19:20:05 -0400
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i686-pc-linux-gnu)

I wrote:
> ivo.welch@anderson.ucla.edu (ivo welch) wrote:
>> alias tryme="$PWD/$1"
>
> alias tryme='"$PWD/$1"'
> This happens to work

Er, no, it doesn't.  Aliases don't have positional parameters at all,
so you have to use a function.  Here is what happens to work, but
might be by accident:
alias foo='"$bar"'
bar=true
foo; echo $?
bar=false
foo; echo $?


paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]