5th June 2001[Up]
Understanding MUNDI Metacommands -- Tue Jun 13 23:50:55 BST 1989 ================================================================ MUNDI metacommands are all signalled by the existance of a single character at the beginning of a line of input. If the first character is special, (ie. is a metacharacter), then the front-end program, (ie. the program you are interacting with now) will handle whatever metacommand has been invoked, and will pass the result, if appropriate to the central program that coordinates the players. (This will happen after, for instance, a history substitution). If the first character in a line is _not_ a metacharacter, then the line will have any relevant alias-substitution performed on it, and then be passed ontop the coordinating program anyway, to be handled as a game-command. The metacharacters can be changed from their defaults -- however, it is suggested that you not do this unless youy really know what you are doing. All the examples given in the heirachical help will be given using the default metacharacters, so they will only confuse you if you are not 100% clear on what is going on. There are a total of 12 metacommands. These are SUBSTITUTE, CHANGE_PROMPT, ALIAS, UNALIAS, PRINT_HISTORY, PREVIOUS, REPLACE, CHANGE_IFS, METAMETA, SOURCE, COMMENT and ECHO. They are invoked by respectively by the characters '!', '@', '>', '<', '%', '-', '^', '&', '*', '=', '#' and '|'. Don't worry about learning all these for now, they will be explained in the relevant section. The important thing for now is simply to understand that metacommands are invoked always by single characters -- not by words. You will probably have used the pseudo-metacommand "alias" before, but this is not really a metacommand at all -- it is itself an alias for ">". Naive users will find this easier to relate to, but if you really want to understand the system, you'd better recognise that it is actually the character ">" that is magic. Anyway, the metacommands fall into four main categories, which are (mostly) independant, so you could become fluent in, for instance, aliasing, without having to look at the section on history at all. The categories are: aliasing: How to make one word stand for another, or for a sequence of words; how to list aliases; how to ensure that they are processed correctly. history: How to get a list of previous commands; how to repeat a previous command; how to change a previous command. front_end: Changing the prompt; %-escapes inthe prompt; also, the difficult stuff including: metametacommands; changing metacharacters; changing internal field seperators. miscellaneous: Everything else: reading commands/metacommands from a file; comments (in files and in direct mode, if you really want to); echoing; application of echoing to aliases. Each of these subjects has its own folder inside this one, so choose the subject you want and learn it. Have fun!