diff options
author | Timo Sirainen <cras@irssi.org> | 2000-04-14 11:27:14 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-04-14 11:27:14 +0000 |
commit | 53b248f6deafb553aae133792659a8412bc00925 (patch) | |
tree | 0c7287dfd3921308073463f4feca46a2c8e1acf6 /docs | |
parent | 5fb98c2210033df3b6bdb4cdd6af77e7c32f6714 (diff) | |
download | irssi-53b248f6deafb553aae133792659a8412bc00925.zip |
Sorry for a big update - I still don't have internet connection at home
and this is what I've been doing a few weeks now.. :) You really shouldn't
upgrade to this version without keeping a backup of the working one, since
this will break everything and at least notify list is broken - probably
something else too.
* On the way to 0.8.0 .. Major rewriting/rearranging code. There's
some changes in behaviour because I'm trying to make Irssi a bit
more compatible with EPIC.
* libPropList isn't needed anymore - I'm using my own configuration
library. This is mostly because different proplists worked a bit
differently everywhere and several people had problems with it.
It's also yet another extra library that you needed to compile
Irssi. New configuration library has several advantages:
You can add comments to configuration file and they also stay
there when it's saved.
It's not nearly as vulnerable as proplist. If some error occurs,
instead of just not reading anything it will try to continue if
possible. Also the error messages are written to irssi's text
window instead of stdout.
It can be managed more easily than proplist - setting/getting the
configuration is a lot more easier.
* Coding style changes - I'm not using gint, gchar etc. anymore,
they're just extra pain when moving code to non-glib projects and
syntax hilighting doesn't work by default with most editors ;)
Indentation style was also changed to K&R because of some political
reasons ;) And I'm already starting to like it.. :) It forces me
to split code to different functions more often and the result is
that the code gets more readable.
And finally I'm also using nst' all over the place.
+ /EVAL <commands> - Expand all the special variables from string and
run it. Commands can be split with ; character. See
docs/SPECIAL_VARS for more info.
+ Aliases are parsed just like /EVAL - arguments are in $0..$9.
+ Text formats are also parsed like /EVAL, arguments used to be in
$1..$9, now they're in $0..$8 so it messes up existing themes..
+ /SET [key [value]] - no more the '=' character. Boolean values
also need to be changed with ON/OFF/TOGGLE values (not yes/no).
Settings aren't saved to disk until you use /SAVE.
+ /TOGGLE <key> [ON/OFF] - same as /SET <key> TOGGLE
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@163 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'docs')
-rw-r--r-- | docs/COMMANDS | 22 | ||||
-rw-r--r-- | docs/FORMATS | 9 | ||||
-rw-r--r-- | docs/PERL | 3 | ||||
-rw-r--r-- | docs/SIGNALS | 2 | ||||
-rw-r--r-- | docs/SPECIAL_VARS | 104 |
5 files changed, 121 insertions, 19 deletions
diff --git a/docs/COMMANDS b/docs/COMMANDS index 1ebc1b9f..2a01a3bb 100644 --- a/docs/COMMANDS +++ b/docs/COMMANDS @@ -318,20 +318,24 @@ LAST [-pub -msgs...] <text> ** Configuration -SET [key [=value / [key [key..]] +SET [key [value]] - Get/set configuration + Get/set configuration. Boolean values also need to be changed + with ON/OFF/TOGGLE values (not yes/no). Settings aren't saved + to disk until you use /SAVE. -ALIAS, UNALIAS <alias> [command] +TOGGLE key [ON|OFF] - Set/remove alias, /unalias is the same as /alias without command + Same as /SET <key> TOGGLE, or if ON or OFF parameter is given + it will work just like /SET. + +SAVE - These codes are extracted in commands: - %0 : name of alias - %1, %2, %3 .. : %th word - &1, &2, &3 .. : &th word + the rest of the text after it - %c : channel name + Save configuration to disk. +ALIAS, UNALIAS <alias> [command] + + Set/remove alias, /unalias is the same as /alias without command Typing extra / before /command (//command) ignores any aliases IGNORE, UNIGNORE <mask> [level [level..]] diff --git a/docs/FORMATS b/docs/FORMATS index f1b9ad30..633b0e42 100644 --- a/docs/FORMATS +++ b/docs/FORMATS @@ -14,13 +14,6 @@ %8 Reverse on/off %9 %_ Bold on/off %: Insert newline + %| Marks the indentation position %% A single % -parameter handling: - -$[30]1 prints parameter 1 cut/padded to 30 chars -$[!30]1 prints parameter 1 padded to min. 30 chars -$[-30]1 prints parameter 1 right aligned -$[30?]1 prints parameter 1 padded with '?' characters -$[30.0]1 prints parameter 1 padded with '0' characters -%| marks the indentation position. @@ -243,7 +243,7 @@ Server server_find_tag(tag) Server server_find_ircnet(ircnet) Find first server that is in `ircnet' -Channel channel_find_any(channel) +Channel channel_find(channel) Find `channel' from any server Channel Server::channel_find_level(level) @@ -436,6 +436,7 @@ Nick::values() "nick" - Plain nick "host" - Host (blah@there.org) "name" - Real name + "hops" - Hop count to the server nick is using "op", "voice", "gone", "ircop" - 1 or 0 "last_check" - timestamp when last checked gone/ircop status. "send_massjoin" - Waiting to be sent in a "massjoin" signal - 1 or 0 diff --git a/docs/SIGNALS b/docs/SIGNALS index 6d92ddb8..7939275c 100644 --- a/docs/SIGNALS +++ b/docs/SIGNALS @@ -42,7 +42,7 @@ channels.c: "channel destroyed", CHANNEL_REC "channel name changed", CHANNEL_REC "channel topic changed", CHANNEL_REC - "channel server changed", CHANNEL_REC + "channel server changed", CHANNEL_REC, SERVER_REC *oldserver "channel query", CHANNEL_REC "channel wholist", CHANNEL_REC diff --git a/docs/SPECIAL_VARS b/docs/SPECIAL_VARS new file mode 100644 index 00000000..e8020558 --- /dev/null +++ b/docs/SPECIAL_VARS @@ -0,0 +1,104 @@ +NOTE: This is just a slightly modified file taken from EPIC's help. +'!' at start of the line means that the feature doesn't work yet.. + +Special Variables and Expandos + +Irssi supports a number of reserved, dynamic variables, sometimes +referred to as expandos. They are special in that the client is +constantly updating their values automatically. There are also +numerous variable modifiers available. + + Modifier Description + $variable A normal variable, expanding to the first match of: + | 1) an internal SET variable + | 2) an environment variable + $[num]variable Expands to the variables value, with 'num' width. If + | the number is negative, the value is right-aligned. + | The value is padded to meet the width with the + | character given after number (default is space). + | The value is truncated to specified width unless + | '!' character precedes the number. + $#variable Expands to the number of words in $variable. If $variable + | is omitted, it assumes $* + $@variable Expands to the number of characters in $variable. if + | $variable is omitted, it assumes $* + $($subvariable) This is somewhat similar to a pointer, in that the + | value of $subvar is taken as the name of the + | variable to expand to. Nesting is allowed. + ${expression} Permits the value to be embedded in another string + | unambiguously. +! $!history! Expands to a matching entry in the client's command + | history, wildcards allowed. +! $"some text" Uses 'text' as an input prompt, and returns whatever + | is typed next. This usage is deprecated, use the + | INPUT command instead. +! $'some text' Same as $"text" except that it only returns the first + | next typed character. + +Whenever an alias is called, these expandos are set to the arguments passed +to it. If none of these expandos are used in the alias, or the $() form +shown above, any arguments passed will automatically be appended to the last +command in the alias. + + Expando Description + $* expands to all arguments passed to an alias + $n expands to argument 'n' passed to an alias (counting from zero) + $n-m expands to arguments 'n' through 'm' passed to an alias + $n- expands to all arguments from 'n' on passed to an alias + $-m expands to all arguments up to 'm' passed to an alias + $~ expands to the last argument passed to an alias + +These variables are set and updated dynamically by the client. The case of +$A .. $Z is important. + + Variable Description +! $, last person who sent you a MSG +! $. last person to whom you sent a MSG +! $: last person to join a channel you are on +! $; last person to send a public message to a channel you are on + $A text of your AWAY message, if any +! $B body of last MSG you sent + $C current channel +! $D last person that NOTIFY detected a signon for +! $E idle time +! $F time client was started, $time() format +! $H current server numeric being processed +! $I channel you were last INVITEd to + $J client version text string + $K current value of CMDCHARS +! $L current contents of the input line + $M modes of current channel, if any + $N current nickname +! $O value of STATUS_OPER if you are an irc operator + $P if you are a channel operator in $C, expands to a '@' + $Q nickname of whomever you are QUERYing +! $R version of current server + $S current server name + $T target of current input (channel or QUERY nickname) +! $U value of cutbuffer +! $V client release date (numeric version string) + $W current working directory +! $X your /userhost $N address (user@host) + $Y value of REALNAME + $Z time of day (hh:mm) + $$ a literal '$' + +For example, assume you have the following alias: + + alias blah msg $D Hi there! + +If /blah is passed any arguments, they will automatically be appended to the +MSG text. For example: + + /blah oops /* command as entered */ + "Hi there! oops" /* text sent to $D */ + +Another useful form is ${}. In general, variables can be embedded inside +strings without problems, assuming the surrounding text could not be +misinterpreted as part of the variable name. This form guarantees that +surrounding text will not affect the expression's return value. + + /eval echo foo$Nfoo /* breaks, looks for $nfoo */ + /eval echo foo${N}foo /* ${N} returns current nickname */ + fooYourNickfoo /* returned by above command */ + |