Debian Codegraph @

help/alias/quote

raw
1 ! $Id: quote,v 1.4 2002-02-21 17:16:31 f Exp $
2 !
3 ! Copyright (c) 1990-2001 Michael Sandrof, Troy Rollo, Matthew Green,
4 ! and other ircII contributors.
5 !
6 ! All rights reserved. See the HELP SCROLLZ COPYRIGHT file for more
7 ! information.
8 !
9 ALIAS MODIFIER:
10 This is a special quoting modifier. Use of this modifier tells
11 ScrollZ that you wish certain characters in the converted text to be
12 quoted using the \ character. The form of this modifier is:
13 $^c<sequence>
14 where c is the character to be quoted, and <sequence> is one of the
15 special sequences. For example, you may wish to do the following:
16 alias foo eval echo $^$*
17 and you do
18 foo This is a $Test
19 Since $ expressions are parsed first, the $^$* is the first thing
20 parsed. The ^$ part tells ScrollZ to quote all $ in the resultant
21 string. So, the $^$* is expanded just like $* and becomes:
22 This is a $Test
23 and the ^$ causes it to quote all $, which becomes:
24 This is a \$Test
25 This is then replaced in the original alias for parsing, so /foo
26 becomes:
27 eval echo This is a \$test
28 When eval goes through the line and reparses it the $ is protected
29 by the new \, and thus the final output will be "This is a $Test".
30 If $ was not quoted, eval would try to expand any $'s into the
31 contents of the associated variable. Eg. one$two would try to
32 expand the variable $two
33 The ^ modifier must be first after the initial $. You may specify
34 more than one character to be quoted simply be adding more ^c to the
35 expression:
36 $^$^\B
37 will quote all occurences of $ and \ in the body of the last message
38 you received.
39
40 Remember, you can use both forms of modifiers, but they must be in
41 the correct order. All ^ modifiers must be first, followed by any
42 [] modifier. For example:
43 $^.[-10]S
44 This will right justify your server name and quote any . in the
45 server name with \.
46
47 See Also:
48 ALIAS WIDTH
49 EVAL