Debian Codegraph @

help/alias/special

raw
1 ! $Id: special,v 1.5 2002-02-24 11:02:23 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 Special character sequences for ALIAS:
10 All special character sequences begin with a $. In their simpliest
11 form, the following have special meaning in aliases:
12 $* Expands to the rest of the arguments on the command line.
13 $n Where n is a non-negative number, expands to the nth arg.
14 $n-m Where n and m are non-negative numbers, expands to the
15 nth thru mth arguments inclusive.
16 $n- Where n is a non-negative number, expands from the nth
17 argument to the end of the argument list.
18 $-m Where m is a non-negative number, expands from the
19 beginning of the argument list to the mth argument.
20 This is the same as $0-m.
21 $~ Expands to the last word on a line.
22 $, Expands to the nickname of the last person who send you
23 a /MSG
24 $. Expands to the nickname of the last person to whom you
25 sent a /MSG
26 $variable Expands to the value of one of the following:
27 1) Matching ASSIGN'd variable
28 2) Matching ScrollZ SET variable
29 3) Matching environment variable
30 4) Nothing
31 It checks in the order shown. Thus, if 1 doesn't match, 2 is
32 tried. If 2 doesn't match, 3 is tried, etc.
33 See ASSIGN for more details.
34 $[number]variable Expands the variable and shows only 'number' of
35 characters. e.g. $blue == "nonsense" $[3]blue == "non"
36 and $[20]blue == "nonsense "
37 In the second case note it is left justified in the space.
38 $[-number]variable Expands as above but it is right justified when
39 the 'number' is bigger than the number of chars in variable.
40 $[-20]blue == " nonsense"
41 $#variable Expands to the number of words in the variable.
42 $@variable Expands to the number of letters in the variable.
43 $"Prompt" Will prompt you (using the text between the double
44 quotes) for input which will be replaced in the
45 alias. ***WARNING*** This is no longer supported.
46 use the INPUT command instead.
47 $(sub-alias) This expands out the sub-aliases, then uses that
48 result in place of the (sub-alias) expression. For example
49 $($0) will first expand $0... suppose it expands to S. Then
50 it replaces that in the original text, giving you $S, which
51 is then expanded to the name of your current server.
52 $!history! This expands to a matching entry in your command
53 history. The text between the ! may contain wildcards.
54 $: Expands to the nickname of the last person to join your
55 channel
56 $; Expands to the nickname of the last person to send a public
57 message to your channel
58 $A Expands to the text of your AWAY message
59 $B Expands to the body of the last MSG you sent.
60 $C Expands to your current channel
61 $D Expands to the nickname of the person whose sign-on was last
62 detected by the NOTIFY mechanism
63 $H Expands to the current numeric being processed
64 $I Expands to the name of the channel to which you were last
65 INVITED
66 $J Expands to the current ScrollZ version. See ScrollZ tutorial
67 for the meaning of additional flags.
68 $K Expands to the current value of CMDCHAR. Useful to have
69 aliases work even when you change CMDCHAR.
70 $L Expands to the current contents of the input line
71 $N Expands to your nickname
72 $O Expands to the value of STATUS_OPER if you are currently an operator
73 $P Expands to "@" if you are a chanop on the current channel
74 $Q Expands to the nickname of the person you are QUERYing.
75 $S Expands to the name of your server
76 $T Expands to the 'target' of your input (either a QUERY nick or
77 a current channel)
78 $U Expands to the last thing cut from the command line. e.g. ^U to
79 clear line will put the line in the variable $U
80 $V Expands to the internal ScrollZ release date
81 $W Expands to the current working directory
82 $W Expands to the Celerity version
83 $Z Expands to the time of day
84 $$ Expands to $
85
86 Argument to aliases will automatically be appended to the expanded
87 alias unless you use one of the following forms in the alias:
88 $*
89 $n
90 $n-m
91 $-m
92 $n-
93 $(sub-alias)
94 If one of these forms is used in the alias arguments are not appended.
95 For example:
96 ALIAS M /MSG
97 will be treated as:
98 ALIAS M /MSG $*
99 However,
100 ALIAS M /MSG $0 $1-
101 will not have the arguments appended. If you have an alias and you wish to
102 prevent arguments from being appended, add $() to the alias. The $() with
103 nothing between the parenthesis expands to nothing and prevents arguments
104 from being appended.
105
106 Any alias may be surrounded by {}s so that it can be imbedded within
107 another string. For example:
108 a${N}a
109 will expand to (assuming your nickname is BigCheese):
110 aBigCheesea
111 Aliases are automatically delimited by certain characters. For example:
112 "$N"
113 expands to:
114 "BigCheese"