@alias #alias [name[=[command]]] Aliases are abbreviations for longer, frequently used commands. As all powwow commands, they are only recognized at the beginning of a line or directly after a semicolon, an open or a closed brace. When an alias is used, the first word following the alias name is placed in the variable $1, the second in $2, etc... up to $9. also, the whole string following alias name is placed in $0. Then, before executing , every $n in is replaced by its value. Examples: #alias summ=cast 'summon' $0 (then "summ thor" is replaced by "cast 'summon' thor") #alias cs=cast '$1' $2 ("cs summon thor" is expanded to "cast 'summon' thor") #alias summ (lets you edit the definition of summ) #alias summ= (removes the alias summ) #alias (displays all defined aliases) #alias ws={wake;stand} (note that you must use braces) Aliases are saved automatically if you started powwow with a file name as argument. Aliases are not expanded in verbatim mode. @action #action [[<|=|>|%][+|-]label] [{pattern | (expression)}=[command]] When 'pattern' is found in a line from the remote host, the 'command' is automatically executed. If the pattern contains $n, powwow matches one word of the remote line and puts it in the variable $n. Instead, if pattern contains &n, powwow places the shortest possible text (can be more than one word, less, or even one word) in the corresponding $n (NOT in &n). As in #alias, before executing , every $n in is replaced by its value. If the first character of the pattern is ^ (caret), the match will only be possible at the beginning of a line. If 'label' is specified, the action is labeled; otherwise it is numbered. The match is case-sensitive. Examples: #action >fount ^There is a fountain here={#print;drink water} #action -fount (turns off action) #action +fount (turns it back on) #action =fount (lets you edit it) #action , you define an action that uses an Extended POSIX regexp to match instead of the standard matcher. #action %first ^([[:alpha:]]+) ([[:digit:]]+)=#print $2 counted $3. (matches abc 123) Note that if the pattern starts with '(', it is evaluated, which means that a regexp that starts with '(' has to be surrounded by ("...") #action %second ("(..+)-\\1")=#print Double $1 (matches xyz-xyz) For regexp actions, $0 = the line, $1 = the whole match and $2... contain the submatches. @bind #bind [edit|key[=[command]]] You can bind most function keys and control keys to enter a command for you when the key is pressed. You cannot (yet) redefine a key already used for an editing function (such as the arrow keys). 'key' is the name of the key you want to define; When defining a new key, you will be asked to press it so powwow can record the control sequence your terminal sends. Examples: #bind (lists all key bindings) #bind f1=recite scroll of recall (you'll have to press f1 then) #bind f1=cast 'sanctuary' (change exiting definition) #bind f1 (lets you edit the definition) #bind f1= (removes the key) #bind edit (lists editing keys) By default, the vt100 numeric keypad is partially used to walk around @key #key name If 'name' is the name of one of the key defined with #bind, #key executes the corresponding command. Example: #bind f1=flee (binds the f1 key to the 'flee' command) At any time, then, you can either: - Press your f1 key on you keyboard - Execute the command '#key f1' and powwow will execute the command 'flee' for you. @reset #reset {all|list-name} Argument: Effect: all clear everything (apply all lines below this) alias clear all aliases action clear all actions bind clear all key bindings and restart with default settings. Note that also editing keys are resetted to default function. at clear all delayed commands in (same thing) mark clear all markers var clear all variables @mark #mark [text[=[attribute]]] This command highlights a text in your output in the way you choose (if your terminal supports it). Attributes: one or more of bold, blink, inverse, underline and/or [] [on ], where the colors are: black, red, green, yellow, blue, magenta, cyan, white and BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, none. Wildcards are allowed ($ for a single word, & for any string). Examples: #mark Sizzler=bold (mark Sizzler in bold) #mark Sizzler (lets you edit the above definition) #mark Sizzler= (Sizzler is no longer put in bold) #mark (lists all markers) #mark *&*=inverse (mark in reverse any string in * *) @module #module [module name] This loads a shared library module by name, if supported by your system. The name of the module should be included in the documentation that came with the powwow extension, for example to load the perl module you would use: #module perl Which gives you the perl command that can be used like: #perl powwow::exec( "say it is " . scalar(localtime()) ) The commands added and their syntax varies depending on the module. @history #history [number] #history alone shows you the last commands in history, up to the number of lines in your screen. #history -n shows the last n commands in history, and #history n executes the n-th command of the history. #history commands are not placed in history. @hilite #hilite [attribute] This sets the attribute of your entered text to the given attribute. Just #hilite turns it off. Attributes: one or more of bold, blink, inverse, underline and/or [] [on ], where the colors are: black, red, green, yellow, blue, magenta, cyan, white and BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, none. @host #host [hostname port] Sets the default host that powwow shall try to connect to when you use #connect. If you type #host without any arguments, the current host and port are shown (provided that you have specified them). @color #color [attrib] (This command exists only if BUG_TELNET is defined, to cope with deficiencies of NCSA telnet 2.2) Set your standard foreground and background to the colours you specify. #color sets default colors @connect #connect [session-id [initstr] [address port]] Connect a new session. To connect your first session, use: #connect main
where
and indicate the host you want to connect to. If no address/port is defined, you either get connected to the default host and port (if you have no open connection) or a list of open connections is shown. Last opened session will be the default one. If is specified, it is sent to host on connection. @keys Default editing keys: ^A &begin-of-line ^E &end-of-line ^B &prev-char M-b &prev-word ^F &next-char M-f &next-word ^P &prev-line ^N &next-line ^D &del-char-right M-d &del-word-right BS &del-char-left M-BS &del-word-left ^K &kill-to-eol M-k &redraw-line-noprompt ^L &redraw-line M-l &downcase-word ^T &transpose M-t &transpose-words ^Q &clear-line M-u &upcase-word ^W &to-history ^Z &suspend Tab &complete-word M-Tab &complete-line Ret &enter-line LF &enter-line not assigned: &insert-string M- means press escape and then , or press meta/alt key at the same time as . ^ means control. If your terminal has arrow keys, they are set for default to move cursor and to step around history. @wrap #wrap [on|off] Normally, powwow wraps words that would have been cut by the right margin to the next line. This command lets you turn it off and on. @compact #compact [on|off] Normally, powwow does not touch the prompts on screen while you play. In #compact mode, instead, lines containing only a prompt are deleted when further messages arrive from the remote host. @echo #echo [on|off] Normally, powwow echoes on your screen each command sent to remote host but not directly typed (example: aliases and actions sending text to the MUD). When #echo is off, such commands are still sent to host, but not echoed on screen. @info #info [on|off] Normally, powwow prints on screen some messages each time you define/edit/delete an #alias, #action, #bind and similar. When #info is off, those messages are not typed at all. (But errors are still printed on screen) @debug #debug [on|off] Normally, powwow does not print on screen the command lines it executes. When #debug is on, every line executed by powwow is also echoed on screen (warning: this prints LOTS of lines on your screen) @delim #delim [normal|program|{custom } By default, when powwow adds words to the word completion buffer, it uses only SPACE (' ') and SEMI-COLON (';') as delimeters. You can change this behaviour by specifying "program" or "custom" mode. The "program" mode uses ' <>!=(),.;"'{}[]+-/*%=' as separators, which is suitable if you are doing some kind of on-line programming. You can also make a customized setting with the "custom" mode (space is always used as a delimeter). This setting also affects &transpose-words (usually bound as M-t) @for #for ([init];check;[loop]) command Directly copied from C language, this command evaluates 'init' (if specified), then repeats the following cycle: 1) evaluate 'check', if result is 0 (false) stop repetition 2) execute 'command' 3) evaluate 'loop' (if specified) 4) restart from 1) As with #while, #for performs the parameter substitution in 'command'. Example: #for (@0=32; @0<=47; @0++) read @0 (read messages 32-47) @at @in #at [label [(time-expression) [command]]] or #in [label [(delay in millisec.) [command]]] If you want to tell powwow to execute the command 'kill wolf' 2 seconds after you type it, use this command: #in attack (2000) kill wolf If you do not specify the command, powwow assumes the label is already defined, and changes its delay. A delay less than zero means the delayed label is disabled. A delay of zero deletes the delayed label. If you specify only a label, powwow lists it. If you specify nothing, all delayed labels are listed. The #at command is almost the same as #in, but assumes the expression in ( ) is a time. For example (114520) means 11:45:20 and ("114520") is the same. After executing a delayed command, powwow does not delete it, but simply disables it. @stop #stop Disables all delayed commands (not delete). Useful if you start an infinite loop with a self-reactivating delayed command @add #add {text|(expression)} Add the text or result of expression (calculator is used to evaluate the expression) to the word completion list. Example: #action >reply ^$1 tells you={#print;#add $1} (from now on, you can use TAB to complete that name) @addstatic #addstatic {text|(expression)} Add the text or result of expression (calculator is used to evaluate the expression) to the static word completion list. Example: #addstatic Tintin Milou (from now on you can always use Tab to complete these two names) Note that the static list is not saved when you run #save, and its words will never be overwritten as new words are added. It is best used from your #init command, for example: #init ={#identify;#exe | list This command lets you list or change various options of powwow. #option lists all current option settings #option list long list of current options #option =