/paste

Usage:

/PASTE [-pnx] [prefix]
/ENDPASTE


After executing /paste, every line of input (including lines that begin with "/") will have prefix prepended to it and then get sent to the current socket. If prefix is omitted and -n is not specified, the prefix defaults to the value of %paste_prefix; if %paste_prefix is empty or unset, it defaults to ":|". Typing "/endpaste" or "." on a line by itself ends the pasting; "/abort" on a line by itself aborts the pasting. /Paste can be very useful when using the cut-and-paste mechanism of many windowing systems.

Options:

-p
"paragraph mode": adjacent non-blank lines are joined, and leading spaces are stripped (this is particularly useful when pasting text cut from a web browser or a window of different width).
-n
Don't prepend any prefix.
-x
After prepending the prefix (if any), execute the resulting line as a command (without substitution) instead of sending it.
-wworld
Send the text to world.
-eend
End when the user types end (default: "/endpaste"). With or without this option, "." will always work.
-aabort
Abort when the user types abort (default: "/abort"). With or without this option, interrupt (^C) will always work.
-q
quiet: do not print "Entering paste mode" message.
-s
strip trailing spaces from each pasted line
-h
invoke matching SEND hooks for each line sent by /paste.

Note that /endpaste is not actually a command, but a "magic cookie" recognized by /paste. "/Endpaste", ".", and SIGINT (^C) are the only ways to end /paste.

Lines sent by /paste will invoke matching SEND hooks.

Examples:

Prepare to paste text from a web page to a mud:
/paste -p
Prepare to paste a bunch of lines to be recorded in your input history:
/paste -x /recordline -i -

See: /quote


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