I am trying to have a list, say AliasList that holds a bunch of alias names of aliases that I use. Then I want to be able to call/use those aliases through the list.
Let's say I've got 3 aliases These, Those, Any (that each execute several commands) and so AliasList = {These|Those|Any}
What can I type at the command line to execute Those through the list? My end goal is to have meta-aliases like C1, C2, C3 that will execute These, Those, Any respectively. I would then be able to change the members of AliasList directly and/or change the commands in These Those or Any and _without_ changing C1...C3 they would execute the proper commands.
Would #alias C1 {@{@AliasList.1}} work? I haven't tried it yet (no zmud or zuggsoft forum access right now), but anticipate failure (somehow it doesn't look right)... help appreciated.
Aliases in a stringlist
-
- Sojourner
- Posts: 956
- Joined: Thu Feb 21, 2002 6:01 am
- Location: Copenhagen
To the first question:
To the second question:
@commandArray.1 does not have what computer people call an lvalue, this means you can't directly assign into it. But the function you found does it.
Code: Select all
#AL a1 {foo;foo2}
#AL a2 {bar;bar2}
@commandArray = {a1|a2}
#AL aa1 {#execute {@commandArray.1}}
#AL aa2 {#execute {@commandArray.2}}
To the second question:
@commandArray.1 does not have what computer people call an lvalue, this means you can't directly assign into it. But the function you found does it.
Who is online
Users browsing this forum: No registered users and 20 guests