Questions about Aliases : "Menu" and "Exactly"

Posted by Flannel on Thu 27 Jun 2002 11:07 PM — 2 posts, 7,669 views.

USA #0
Well, Menu is on the edit alias screen (next to Label), but, thus far I havent found a single reference to it otherwise, whats it do, etc?

And, "Exactly" isnt about Alaises per say, although, it might be, Its about Reg Exp if nothing else:
the Help file (for alias, I dont THINK anywhere else) references an "Exactly" something (either command box, or maybe in the Reg Exp itself) to allow you to match on "t" but not "tell" (example used). How do I invoke this 'exactly'?

If it helps, Im using 3.22, and whatever help file came with that.
Amended on Thu 27 Jun 2002 11:09 PM by Flannel
Australia Forum Administrator #1
Quote:

Well, Menu is on the edit alias screen (next to Label), but, thus far I havent found a single reference to it otherwise, whats it do, etc?


If you supply a label, and then check "menu" the alias is added to a pop-up menu that you can use as a shortcut way of doing things. To invoke the menu set up a couple of aliases with "menu" checked, and the hold down CTRL and left-click the mouse in the output or command window.

A menu will appear, and you can select any of the aliases in the list. Any underscores in the alias label are converted to space. For example, you might make an alias like this:


<aliases>
  <alias
   name="Get_Drink"
   match="gd"
   enabled="y"
   menu="y"
  >
  <send>open bag
get bottle bag
drink bottle
put bottle bag
close bag</send>
  </alias>
</aliases>


Using this alias you can either type "gd" (get drink), or ctrl+left+click and select the menu item "Get Drink" (see how the underscore was converted to a space).

Quote:

How do I invoke this 'exactly'?


The references to 'exactly' in the help file are for an earlier version of MUSHclient where an alias could be an exact match, or a partial match. The three types previously supported were:

  1. Exact
  2. Anywhere on line
  3. Start of line


For example, if the alias was "a" then they would match like this:

  1. Exact - matches "a" exactly
  2. Anywhere on line - matches "bag" for instance
  3. Start of line - matches "ant" but not "bag"


However in recent versions aliases are more powerful and can use wildcards (and regular expressions), so you now might do it like this:

  1. "a" - matches "a" exactly
  2. "a" (regular expression) - matches "bag"
  3. "a*" - matches "ant" but not "bag"


So, for an exact match, just type in exactly what you want to match on. My previous example "gd" was a case in point. It matches "gd" if that is exactly what you typed, but not (say) "gdx".