/prompt

Function usage:

PROMPT(text)

Command usage:

/PROMPT [-aattrs] [-p] text


Sets the prompt for the current socket to text, replacing any existing prompt.

Command options:

-aattrs
Apply the attributes given by attrs to text.
-p
Interpet "@{attr}" strings within text as commands to set attributes inline. See decode_attr().

/prompt is most useful when called from a PROMPT hook, like this:

    /def -h"PROMPT *> " catch_prompt = /test prompt({*})
Then, any text that ends in ">" without a newline will be made the prompt.

For a more sophisticated example, see "status line".

See: prompts, hooks (PROMPT)


Back to index
Back to tf home page
Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys