Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ Suggestions ➜ alias suggestion

alias suggestion

Posting of new messages is disabled at present.

Refresh page


Posted by Tspivey   Canada  (54 posts)  Bio
Date Thu 11 May 2006 12:01 AM (UTC)
Message
I think that you should be able to write aliases that:
1. can use the command seperator character as their first character,
2. are able to set a flag which ignores the command stacking character for the current line, similar to tintin's \ command to send something as is. I tried to set the command_stack_character from inside an alias, but it takes effect before the alias can get to it.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #1 on Thu 11 May 2006 01:00 AM (UTC)
Message
Just make the alias "send to script" and send what you want with a simple script line. I assume you are using something like ";" as the command separator, and want a ";" in the line?

Try this:


Send "@dig Waterfall = West;W, East;E"


Adding the word "Send" isn't a big extra imposition. If you need to send multiple lines, use Lua as your script language, because that has multi-line literals, like this:


Send [[
@dig Waterfall = West;W, East;E
@open East;E =#88,West;W
]]


Inside a multi-line literal you don't need to worry about quote symbols either.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Tspivey   Canada  (54 posts)  Bio
Date Reply #2 on Thu 11 May 2006 05:13 AM (UTC)
Message
That will work from inside a script, but what if I want to send something with a ; from the command line? That's where the alias comes in.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #3 on Thu 11 May 2006 06:20 AM (UTC)
Message
OK, I see what you mean.

Can anyone see an objection to changing the behaviour so that, if the very first character of a command is the command stack character, command stacking is disabled for the rest of the command input?

I can't offhand think why you would start a command with the command stack character, so this is probably safe enough.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #4 on Tue 13 Jun 2006 11:42 PM (UTC)
Message
There is now an option in version 3.75 to pre-process typed commands in a plugin. This would let you make "smarter" command stacking, for example if the command starts with a certain word, command stacking is disabled for that command.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


14,311 views.

Posting of new messages is disabled at present.

Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.