Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu'
-DCONF_VENDOR='unknown'
` Linda Walsh wrote:
The latest error I got is a a simple type -- most of them probably
are, with that many
lines of code in ~3-4 weeks, there's bound to be -- trouble is I'm
stubborn sometimes
about 'punishing myself'' when I mess up...which isn't always
productive! ;-)
Sometimes
On Mon, Aug 15, 2011 at 12:45:58AM -0700, Linda Walsh wrote:
#!/bin/bash -exu
alias sub=function
alias unless='if !'
Aliases don't even *work* in scripts.
typeset -xr sub unless
declare -a SAVE_ARGS=( $@ )
typeset -xr snapdir='snapdir'
# in shell: white is black and black is white:
this works:
$ alias z='echo a'
$ zz(){ z b; }
$ zz
a b
however, after sourcing this file:
if true; then
alias z='echo a'
zz(){ z b; }
fi
I get
$ zz
bash: z: command not found
$ type -a z
z is aliased to `echo a'
i.e., somehow zz is defined as function calling z, and z is defined as
an
* Andreas Schwab fpu...@yvahk-z68x.bet [2011-08-15 18:42:30 +0200]:
Sam Steingold s...@gnu.org writes:
this works:
$ alias z='echo a'
$ zz(){ z b; }
$ zz
a b
however, after sourcing this file:
if true; then
alias z='echo a'
zz(){ z b; }
fi
Aliases are expanded during reading,
On 08/15/2011 01:10 PM, Sam Steingold wrote:
* Andreas Schwabfpu...@yvahk-z68x.bet [2011-08-15 18:42:30 +0200]:
Sam Steingolds...@gnu.org writes:
this works:
$ alias z='echo a'
$ zz(){ z b; }
$ zz
a b
however, after sourcing this file:
if true; then
alias z='echo a'
zz(){ z b; }
fi
Sam Steingold s...@gnu.org writes:
Cool. Now, what does this imply?
For almost every purpose, shell functions are preferred over aliases.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
And now for something
* Andreas Schwab fpu...@yvahk-z68x.bet [2011-08-15 22:04:04 +0200]:
Sam Steingold s...@gnu.org writes:
Cool. Now, what does this imply?
For almost every purpose, shell functions are preferred over aliases.
so, how do I write
alias a=b
as a function?
(remember that arguments may
On Mon, Aug 15, 2011 at 2:45 AM, Linda Walsh b...@tlinx.org wrote:
` Linda Walsh wrote:
The latest error I got is a a simple type -- most of them probably are,
with that many
lines of code in ~3-4 weeks, there's bound to be -- trouble is I'm
stubborn sometimes
about 'punishing myself''
` Dennis Williamson wrote:
On
Greg already covered some important points and I'll add a few more.
*cough*
sorry, I just haven't responded ... I threw up my hands in disgust
and got too
irritated to respond, so have done other things.
As has been said before,
10 matches
Mail list logo