lastlog_command
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | lastlog_command [2014/01/17 15:19] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | # $EPIC: lastlog_command.txt, | ||
| + | ======Synopsis: | ||
| + | [[lastlog]] [-] [-< | ||
| + | |||
| + | ======Description: | ||
| + | The client keeps a copy of everything displayed to your windows in the | ||
| + | [[lastlog]] buffer. | ||
| + | this buffer and have items re-displayed to your window. | ||
| + | lastlog buffer is per-window and controlled by [[set lastlog]] or | ||
| + | [[window lastlog]]. | ||
| + | per-window and controlled by [[set lastlog_level]] or [[window lastlog_level]]. | ||
| + | |||
| + | For backwards compatibility reasons, up to three non-option arguments are | ||
| + | acceptable: | ||
| + | * If the first option specified is not a number, then it is treated as if it were the argument to the -LITERAL option. | ||
| + | * The first number is the number of lines to look at. | ||
| + | * The second number is the position in the lastlog to start at. | ||
| + | |||
| + | ======Options: | ||
| + | ^ Option | ||
| + | |- | Do not display the " | ||
| + | |-literal < | ||
| + | |-regex < | ||
| + | |-target <# | ||
| + | |-max < | ||
| + | |-mangle < | ||
| + | |-skip < | ||
| + | |-number < | ||
| + | |-context < | ||
| + | |-file < | ||
| + | |-separator < | ||
| + | |-reverse | ||
| + | |-< | ||
| + | |--< | ||
| + | |-rewrite < | ||
| + | |-window < | ||
| + | |||
| + | ======Examples: | ||
| + | The simplest use of the command just redisplays everything: | ||
| + | /lastlog | ||
| + | |||
| + | But that's not terribly useful. | ||
| + | only references to a string, such as your nickname: | ||
| + | /lastlog hop | ||
| + | |||
| + | You can double quote the string if it has spaces: | ||
| + | /lastlog "help me" | ||
| + | |||
| + | You can filter a string based on the " | ||
| + | that the output was caused by. | ||
| + | /lastlog -target #epic "help me" | ||
| + | or to just see [[msg]]s sent to or from hop, | ||
| + | /lastlog -target hop | ||
| + | |||
| + | You can use regexes instead of a string (you can double quote it): | ||
| + | /lastlog -regex hi.*there | ||
| + | Regexes are compiled as REG_EXTENDED (modern regexes), REG_ICASE (case | ||
| + | insensitive), | ||
| + | if you are curious about this. Modern Regexes are what egrep(1) takes, | ||
| + | which are subtly different from basic regexes, which is what grep(2) uses. | ||
| + | |||
| + | You can use both a literal string and regexes together, and it must match | ||
| + | BOTH of them: | ||
| + | /lastlog -target #epic "help me" -regex " | ||
| + | |||
| + | Normally the lastlog buffer is searched OLDEST to NEWEST, and redisplayed | ||
| + | so everything appears in the same order as originally presented. | ||
| + | want to see the NEWEST entries first, which you can do with -reverse. | ||
| + | /lastlog -reverse -target #epic | ||
| + | Please note that this DOES display things in reverse order, newest to oldest! | ||
| + | |||
| + | You might not want to see everything that matches, so you can numerically | ||
| + | limit the number of matches displayed. | ||
| + | /lastlog -reverse -max 5 -target #epic "help me" | ||
| + | (to show the 5 most recent times that someone has said "help me" on #epic) | ||
| + | |||
| + | You might not want to have the first few lines considered for matching. | ||
| + | You can tell the client to skip the most oldest lines (or the most recent | ||
| + | lines if you use -reverse): | ||
| + | /lastlog -reverse -skip 25 -max 3 hop | ||
| + | shows the most recent 3 times " | ||
| + | visible in your window, assuming your window is 25 lines. | ||
| + | |||
| + | -number | ||
| + | |||
| + | -context | ||
| + | |||
| + | -mangle | ||
| + | -rewrite | ||
| + | $0 - lastlog refnum | ||
| + | $1 - timestamp | ||
| + | $2 - window refnum | ||
| + | $3 - level | ||
| + | $4 - reserved | ||
| + | $5 - reserved | ||
| + | $6 - reserved | ||
| + | $7 - " | ||
| + | $8- - the line of text | ||
| + | All of this is limited to 10k, so super long lines are trunc' | ||
| + | |||
| + | -separator | ||
| + | - (turns off header/ | ||
| + | |||
| + | -window | ||
| + | |||
| + | -file | ||
| + | |||
| + | -levels | ||
| + | -ALL | ||
| + | --ALL | ||
| + | |||
| + | |||
| + | Bare arguments | ||
| + | -literal is the same as bare argument | ||
| + | |||
| + | If -skip is > the size of the lastlog, it no-ops. | ||
| + | If -skip is >= 0 but -number is 0, it no-ops | ||
| + | If -max is 0, it no-ops. | ||
| + | -literal acts as a pmatch against " | ||
| + | /xdebug lastlog will show you the gory details | ||
| + | -file will " | ||
| + | |||
| + | |||
| + | ======Examples: | ||
| + | To list all private messages from JoeBob: | ||
| + | /lastlog -msg joebob | ||
| + | |||
| + | To list all public messages from JoeBob in the last 100 lines | ||
| + | /lastlog -public joebob 100 | ||
| + | |||
| + | To list all occurrences of the phrase " | ||
| + | to 600 lines ago: | ||
| + | /lastlog " | ||
| + | |||
| + | To list everything *except* messages: | ||
| + | /lastlog -all --msgs | ||
| + | |||
| + | To write everything containing " | ||
| + | /lastlog -file lastlog.out foo | ||
| + | |||
| + | To list only public messages to #epic: | ||
| + | /lastlog -target #epic -public | ||
| + | |||
| + | To list everything containing a specific number | ||
| + | /lastlog -literal " | ||
| + | |||
| + | ======Rewriting the output: | ||
| + | The -REWRITE flag rewrites each line by expanding the < | ||
| + | the following values for $* | ||
| + | |||
| + | |$0|The lastlog item's unique refnum| | ||
| + | |$1|Timestamp (suitable for use with $strftime())| | ||
| + | |$2|Window refnum| | ||
| + | |$3|Output level| | ||
| + | |$4|Reserved for future use| | ||
| + | |$5|Reserved for future use| | ||
| + | |$6|Reserved for future use| | ||
| + | |$7|Output target| | ||
| + | |$8-| The logical line of output| | ||
| + | |||
| + | Remember that the < | ||
| + | |||
| + | Example: | ||
| + | /lastlog -rewrite " | ||
| + | |||
| + | ======History: | ||
| + | The [[lastlog]] command first appeared in ircII. | ||
| + | The -REWRITE flag first appeared in EPIC5-0.3.5 | ||
| + | |||
lastlog_command.txt · Last modified: 2014/01/17 15:19 by 127.0.0.1
