 |
graythe Newbie
Joined: 19 Jan 2007 Posts: 1
|
Posted: Fri Jan 19, 2007 2:36 pm
Arguments carrying over? |
I've had a slight problem with a way I used to use to daisy-chain two aliases together - something like this
#alias hl {hamstring @target left;#if (!%null(%1)) {#exec %1}}
#alias sl {slash @target;#if (!%null(%1)) {#exec %1}}
etc.
At the moment, if I use "hl sl" then the second alias seems to retain the arguments from the first alias, thus sending me into an endless loop. Anyone know if there's something I'm doing wrong that could fix this? |
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Jan 19, 2007 4:24 pm |
That shouldn't be creating an infinite loop, surely. One thing you could try is using named arguments:
#alias hl($hlarg) {hamstring @target left;#if (!%null($hlarg)) {#exec $hlarg}} |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Jan 19, 2007 8:24 pm |
Definitely loops like a bug. Added to the bug list.
|
|
|
 |
|
|