|
atraeyu Novice
Joined: 29 Dec 2006 Posts: 41 Location: Chester, VT
|
Posted: Mon Jan 01, 2007 5:37 am
Pulling ALL line test with an alias |
I'm having problems with alias that work like this:
#ALIAS s($text) say $text
Works perfect if you only say 1 word. If you say more than word, only the first word is output, for example:
say hello world
outputs
hello
How do I make it output everything? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Jan 01, 2007 6:21 am |
I seem to recall that Zugg did away with the %-1 stuff? I think you use %params() or some other newer function that does the same thing. I'm not in much shape right now to go looking, but fairly sure it's all pretty obvious.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Jan 01, 2007 1:13 pm |
Each local variable only picks up parameters in order. You need to group it into one parameter with curly braces {} or quotes ""
s "something something something"
s {something something something}
If you want to use all parameters you either use %-1 or the %params function, which is exactly the same as %-nn.
So your alias will be:
#alias s {say %-1}
#alias s {say %params} |
|
|
|
atraeyu Novice
Joined: 29 Dec 2006 Posts: 41 Location: Chester, VT
|
Posted: Mon Jan 01, 2007 5:54 pm |
Awesome, thanks!
|
|
|
|
|
|