irssi (IRC client) - Questions and Answers

compiled by Sven Guckes

Latest change: Mon Feb 14 10:42:23 CET 2011

Sven's Unanswered Questions

IRSSI-Q01: Nick Activity Overview

Keywords: activity, sorting

Problem IRSSI-Q01 [2007-05-08] - "nickname window": is there a way to split the window such that the nicks in the notification list are monitored as to their activity? An example overview could look something like this:
  |irssi 0.8.10 | #irssi: Irssi 0.8.11 released! ||
  |Big Brother Nick:                                                   |
  |audin: 5min  esc: 23min  suchix: 42min                              |
  |2007-05-08 01:23 SvenG: i wonder if such a thing exists..           |
  |[SvenG(+eiw)] [10:#irssi(+Pcgnt)] [Act: 4,5,6,8,15]                 |
  |[#irssi]                                                            |

IRSSI-Q02: Save deletions for later?

Keywords: Input - Kill Ring - Delete+Recall

Description: You can delete the complete input line with CTRL-U - and you can get back (recall) the deleted text with CTRL-Y. however, you can only recall the very last deletion. Question: Is there some extension which allows a "kill ring" to retain the last N deletions, like in shells? Workaround: Use the command "forward_history" by pressing the DOWN arrow. this saves the current input line and gives you the next one. use UP to get back to the previous input line and then continue typing from there. If you are used to using CTRL-U to delete the input line then simply bind it to the forward_history command: /bind ^U forward_history

IRSSI-Q03: Overview to Windows with Selection

Keywords: overview, windowlist

Description: You can get an overview to all windows with the command "/windows list" - eg:
  /window list
  irssi 0.8.10 -
  2007-07-26 17:00 Ref Name                 Active item     Server          Level
  2007-07-26 17:00 1   (status)                             freenode        ALL
  2007-07-26 17:00 2                        #guckes         freenode
  2007-07-26 17:00 3                        #freewrt        freenode
  2007-07-26 17:00 4                        #freitagsrunde  freenode
  2007-07-26 17:00 5                        #google         freenode
  2007-07-26 17:00 6                        #grml           freenode
  2007-07-26 17:00 7                        #irssi          freenode
  2007-07-26 17:00 8                        #juxlala        freenode
  2007-07-26 17:00 9                        #ofset          freenode
  2007-07-26 17:00 10                       #xterm          freenode
  2007-07-26 17:00 11                       #rmll2007       geeknode
  2007-07-26 17:00 12                       #rmll2008       geeknode
  2007-07-26 17:00 13                       #work           freenode
  2007-07-26 17:00 14                       bastla          freenode
  2007-07-26 17:00 15                       odile           freenode
  2007-07-26 17:00 16                       zeroC           freenode
  2007-07-26 17:00 17                       zoRRo           freenode
However, you cannot select a window from that list to jump to, ie give a command to go to the next or previous window, or jump to the first or last entry of that list. And you need to type a lot more commands to give this list a new order. Questions: Is there a plugin to get an extra window for an overview which allows to select a windows to jump to - and maybe also to rearrange the current order? Or maybe is there a nice command to reorder all windows? i could use something like this:
/windows order #foo #bar #baz restchan nick1 nick2 restnick

IRSSI-Q04: to edit the config or not to edit the config file?


the FAQ (faq.txt.gz) says:
  Q: How do I add the active network to the statusbar?
  A: Modify the window-line in statusbar section in config file to
     window = "{sb $winref:$tag/$T{sbmode $M}}";
why does this FAQ give an answer that involves editing the config file when obviously it is irssi's philosophy that editing of the config file should NOT be done, but you should rather give some commands on the input line and then issue a "/save"?

IRSSI-Q05: Reverse Incremental Search?

Keywords: searching, backwards, history

Is there are way to access old lines within the input be searching backwards in the history of the input? Something like the "reverse-i-search" within bash (as provided by the gnu readline library)? answer: description: "Search within your typed history as you type (like ctrl-R in bash)"

IRSSI-Q06: Aggregating Channels into one Window

Keywords: ...

How would you aggregate two or more channels into one window? Is this possible at all? And how would you know which nick/person was talking on which channel?

yes, it is possible. you can "move" channels as "items" into the same window. you can switch between items with CTRL-X (just as with servers). (this needs a good example, though.)

Solutions and Workarounds

the following has some solutions and workarounds.

General Tips

[Startup] After starting irssi with irssi from a shell it should simply open up a window and wait for your commands. [Quit] You can leave from here with /quit right away. However, while irssi is running, you can always get help with the /help command. irssi then lists some 128 commands. for which you can get further help by adding a commandname as a parameter, eg /help join. [Ambiguity] Actually, /he is unambiguous enough, so /he nick suffices for getting help on the nick command. [Tab Completion] You can also expand on the input of a command with TAB, eg enter /fl and type a TAB; the command should then be expanded to /flushbuffer. [Tab Completion Cycle] When a prefix is not unique then the tab completion should cycle through possible completions. Try /a with this; "tabbing" should then cycle through the commands /accept, /action, /admin, /alias, and /away.

[Joining Channels] ...

[Channel Overview] Once you have joined a channel you might want to get an overview to the nicknames.

[Adding servers] When you use the command "/server" then you'll switch from the current server to another server, ie you lose the connection to the current server. if you want to *add* another server then you must use the command "/connect".

[Access to Windows] When you /join some more channels then their windows naturally add up - and you want to easily switch between them. The command /window allows a number parameter to switch to a window with, say, number 23 with /window 23. But of course this is a lot of typing. It is much faster using the default key bindings - see Switching between Windows.

[Leaving Channels] You can leave a channel simply with /leave - but you can also close its window with /window close. [Aliases] Ad this command tens to be used quite frequently, there is already an alias for it - /wc.

[Ignore] Some people tend to be quite obnoxious, and it helps to ognore them. however, this can be quite a task as you will be interrupted by their talk, anyway. This is where you might want you irc client to help you out. You can /ignore nicknames, but also ignore talk by the words which are contained within - even patterns (regexes). ...

[Logging] Many people are using IRC to actually have meetings - and then it helps to keep a log of the talk.

[Configuration] You can change many things with your irssi by /set commands. Once you are done you can then /save your changes - and irssi rewrites your config file ($HOME/.irssi/config). Mind you, with most other text based programs you would use a text editor to make changes.

Switching between Windows

Q: How to switch between channels/rooms/windows? Short answer:
/window N,
/window goto #channel,
alt-# (1234567890) +
alt-X (qwertyuio)
longer answer:
alt-1   jump to window #1
alt-2   jump to window #2
alt-3   jump to window #3
alt-4   jump to window #4
alt-5   jump to window #5
alt-6   jump to window #6
alt-7   jump to window #7
alt-8   jump to window #8
alt-9   jump to window #9
alt-0   jump to window #10

alt-q   jump to window #11
alt-w   jump to window #12
alt-e   jump to window #13
alt-r   jump to window #14
alt-t   jump to window #15
alt-y   jump to window #16
alt-u   jump to window #17
alt-i   jump to window #18
alt-o   jump to window #19

The key bindings for windows #11 to #19 are obvious for someone with a us keyboard as the top row of keys reads "qwertyuio(p[])". Users of a DE keyboard will have a 'z' instead of the 'y', of course. So they need to bind meta-z to the same commands as meta-y:

  /bind m-z change_window 16
Switch to next/previous window:
  CTRL-N  next     window (next higher number)
  CTRL-P  previous window (next lower  number)
Switch by command: The "/window" command takes a number, too:
  /window [N]
  /window 23
  /window goto #prefix[TAB]

You could also use "/join #channel" - because if you have already join a channel then irssi will simply switch to the already opened window. Mind you, a "/join" depends on the currently selected server. You may to switch the server first (using CTRL-X in the server window).

Switch by activity:
  Alt-a   go to next window with activity

The shortcut Alt-a switches first those with a private message (red number), then those with public messages (white number, and then the ones with only status messages (blue number).

The one thing that irssi does not do yet is to recognize when someone has said something that may be of interest to you.

Backlog Expansion

Is there word expansion for words from within the current channel/page/window? YES, there is! (original) (my copy)
download the script to your irssi scripts directory - and then simply load that script from within irssi:
shell: wget $URL -O $HOME/.irssi/scripts
irssi: /script load

Channel/Window Layouts

is there a command to set which channel is in which window? I know I can do "/win move 2" and it will move current channel to window 2, but is there a way to do it to the non current window? IE /win move #somechan 2 perhaps "/alias winmove /window goto $1; /window move $2"


when switching between windows using alt-# (cipher) or alt-@ (alpha) you will encounter a conflict with the gnome-terminal: the shortcuts alt-e and alt-t are already taken by the gnome-terminal for its menus "Edit" and "Terminal". workaround: you can disable all menu shortcuts for your gnome-terminal. use "Edit:Keyboard Shortcuts..." and check the radio button for "Disable all menu access keys (such as Alt-f to open Filemenu)".


Q: when you have an xterm-256, ie one which understands 256 colours -
   is there a color theme which makes use of more than 8 colours?
A: irssi itself does not have support for 256 colours yet.
   irssi however uses ncurses which can be compiled with
   "--enable-ext-colors" - this should give you 256 colours.
   the terminal should know about it, too.
   by adjusting the TERM variable, eg:
   KDE's Konsole with "export TERM=konsole-256color"
   if you are using "GNU screen" inside as a window manager
   then also screen needs to be compiled with "--enable-colors256"
   now only irssi needs some support for this.. see also:

Window Navigation/Switching

When you have jumped to another window, eg with alt-a, you may realize that you need to jump back to the previous one. The following command lets you jump back to the previous window:
/win last
i need this so often that i have bound this command to CTRL-R:
/bind ^R /win last

Key Bindings

Output of all current key bindings to a file:
/lastlog -file filename
problem: no output of /bind with this. Return to last window:
/win last
Bind it to CTRL-R:
/bind ^R /win last
This adds this entry to the configuration:
keyboard = (
  { key = "^R"; id = "command"; data = "win last"; }
The command "/bind" gives you a list of all current key bindings, ie all combinations of keys and their bound internal functions.
> /bind
Key                  Action
^F                   command /names
^G                   command clear
^L                   command clear
^R                   command history_search
^W                   command win last
meta-up              key mup
meta-right           key mright
meta-O               key meta2
meta2-1~             key home
meta2-7~             key home
meta-left            key mleft
meta2-c              key cright
^[                   key meta
meta2-d              key cleft
meta2-6~             key next
meta2-A              key up
meta2-B              key down
meta2-C              key right
meta-[O              key meta2
meta2-D              key left
meta-[               key meta2
meta2-1;5C           key cright
meta2-F              key end
meta2-5~             key prior
meta2-1;5D           key cleft
meta2-G              key next
^?                   key backspace
^H                   key backspace
^I                   key tab
meta2-1;3B           key mdown
meta2-3~             key delete
^J                   key return
meta2-1;3C           key mright
meta2-1;3D           key mleft
meta2-5C             key cright
^M                   key return
                     key space
meta2-5D             key cleft
meta2-2~             key insert
meta2-8~             key end
space                multi check_replaces;insert_text
return               multi check_replaces;send_line
left                 backward_character
right                forward_character
cleft                backward_word
meta-b               backward_word
cright               forward_word
meta-f               forward_word
^A                   beginning_of_line
home                 beginning_of_line
end                  end_of_line
^E                   end_of_line
up                   backward_history
down                 forward_history
backspace            backspace
delete               delete_character
^D                   delete_character
meta-d               delete_next_word
meta-backspace       delete_previous_word
^U                   erase_line
^K                   erase_to_end_of_line
^Y                   yank_from_cutbuffer
^T                   transpose_characters
tab                  word_completion
meta-k               erase_completion
^P                   previous_window
^N                   next_window
mup                  upper_window
mdown                lower_window
mleft                left_window
mright               right_window
meta-a               active_window
^X                   next_window_item
prior                scroll_backward
meta-p               scroll_backward
next                 scroll_forward
meta-n               scroll_forward
meta-q               change_window 11
meta-r               change_window 14
meta-t               change_window 15
meta-u               change_window 17
meta-w               change_window 12
meta-y               change_window 16
meta-0               change_window 10
meta-1               change_window 1
meta-2               change_window 2
meta-3               change_window 3
meta-4               change_window 4
meta-5               change_window 5
meta-6               change_window 6
meta-7               change_window 7
meta-8               change_window 8
meta-9               change_window 9
meta-e               change_window 13
meta-i               change_window 18
meta-o               change_window 19
^Z                   stop_irc
The command at the start are bindings which I had chosen myself:
> /bind
Key                  Action
^F                   command /names
^G                   command clear
^L                   command clear
^R                   command history_search
^W                   command win last
TODO: The binding for "/win last" on CTRL-W should be bound to something else. as I am quite used to deleting the last word with CTRL-W.
^A                   beginning_of_line
^B                   ???
^C                   ???
^D                   delete_character
^E                   end_of_line
^F                   command /names
^G                   command clear
^H                   key backspace
^I                   key tab
^J                   key return
^K                   erase_to_end_of_line
^L                   command clear
^M                   key return
^N                   next_window
^O                   ???
^P                   previous_window
^Q                   ???
^R                   command history_search
^S                   ???
^T                   transpose_characters
^U                   erase_line
^W                   command win last
^X                   next_window_item
^Y                   yank_from_cutbuffer
^Z                   stop_irc
^?                   key backspace
^[                   key meta
see also:


input line aka prompt line...


(TODO) how to be notified when someone uses your nickname? irssi notifies you by colourizing your nickname, and colouring the window number when the message was off-screen. notification within "screen": show the line from irssi within the last two lines of the current screen.

More Open Questions

i see that "/bind" does not explain about CTRL-B (for bold on/off) and CTRL-V (for inVerse on/off) - why is this? moreover, CTRL-F and CTRL-O insert an inverse F (or O, respectively) - what do these do? answers:
CTRL-O - sets text to normal.
CTRL-F - unknown functionality.

Color Codes

Q: How to enter color codes? A: CTRL-C ff[,bb] So, to enter a color code type CTRL-C followed by ff[,bb] - where ff refers to the two digit number of the foreground, and then then optionally a comma followed by bb - which is a two digits number of the background. The CTRL-C shows up as a "C" in reverse. Examples:
    C08,02  for brightyellow on (dark)blue
Here is an overview to the colors: CTRL-C - insert color codes:
C01schwarz       C02blau       C03gruen      C04hellrot
C05dunkelrot     C06magenta    C07gelb       C08hellgelb
C09hellgruen     C10cyan       C11hellcyan   C12blaugrau
C13hellmagenta   C14dunkelgrau C15reset      C16weiss

C01black         C02blue       C03green      C04brightred
C05dunkelred     C06magenta    C07yellow     C08brightyellow
C09brightgreen   C10cyan       C11brightcyan C12bluegrey
C13brightmagenta C14darkgrey   C15reset      C16white
Warning: There is a bug with irssi for terminals with more than 16 colors, such as rxvt or xterm:


Q: How can you enlarge the input line to two screen lines?
A: It is NOT possible to enlarge the input line.
   The input area is a statusbar item.  Each
   statusbar can currently only occupy one line.


Q: Can you tell irssi to display talk from others as something else,
   eg squeeze long words like "LOLOLOLOLOLOL" to a short one lie "LOL",
   correct their typos, or simply hide expletives?
A: use the script

/TRIGGER ADD -all -nocase -regexp shit -replace sh*t
/TRIGGER ADD -all -nocase -regexp !!!! -replace !


When the text scrolls past the top then you can page up to it - and then down again using these commands: paging up+down:
Alt-p   previous half-page
Alt-n   next     half-page
However, alt-n and alt-p are not so easy to use with one hand as the placement of alt key on my keyboard is at the left side - but 'n' and 'p' are on the right side. As the keys 'z' and 'x' are directly above the alt key, i have bound them to scroll backward and forward, respectively:
/bind meta-z   scroll_backward
/bind meta-x   scroll_forward

Input Line Editing

jumps/movements of cursor:
CTRL-A jump to begin of line
CTRL-E jump to end   of line

META-B jump back    to previous start of word
META-F jump forward to previous start of word
CTRL-U to delete the complete input line
CTRL-W to delete backwards to the next beginning of a word
CTRL-Y to insert the latest deletion (and *only* the latest one)

Query Windows

whenever you send someone a message then irssi can create a new window for your private conversation:
/set autocreate_query_level "MSGS DCCMSGS"


here are the scripts i am using: not on (yet):

Key Binding does not mention this:
    /bind ^g /clear  (does not work)
    /bind ^G /clear  (works!)
the first definition does *not* trigger the clear command when you press CTRL-G. however, the second one does. go figure.


with irssi you can easily be quicker, because you can define aliases for commands:
  /alias nod    /me nods silently.
  --> SvenG nods silently.

  /alias think  /me .oO($*)
  --> SvenG .oO(which talk will Anne give in Berlin?)
and you can define automatic expansion of words on the fly:
  Key        Value          Auto
  eig        eigentlich     yes
  insb       insbesondere   yes
  jed        jedenfalls     yes
  led        lediglich      yes
  merkw      merkwuerdig    yes
  mitt       mittlerweile   yes
  nat        natuerlich     yes
  sog        sogenannt      yes
  sow        sowieso        yes
  viell      vielleicht     yes
and there are some which simply correct my typing:
  Key        Value          Auto
  aslo       also           yes
  becuase    because        yes
  bianries   binaries       yes
  bianry     binary         yes
  charcters  characters     yes
  charcter   character      yes
  uptodate   up-to-date     yes
  upt        up-to-date     yes
aliases and complete can save you a LOT of typing!
  /completion -auto :) ツ
  /completion -auto Yhelp "You are in a maze of twisty little passages, all alike."


The following worked to show umlauts and other weird characters correctly on my terminal:

/set term_charset utf-8

however, i haven't found this setting by looking at my config file again. hmm....

Input of Alt-X combinations


Getting rid of completions

i had an automatic completion to change a smiley :) into a Japanese character (ツ). However, this turned out to be somewhat of a problem for some readers without the support for utf-8. so i wanted to turn off that completion - but *without* restarting the irssi client. so i edited my config file, simply commenting out that very line, and did a "/reload". completion gone! :-) thanks, Quis! here's another way: the /completion command also allows deletion by quoting the string itself:
/completion -delete "FOO"
thanks, met!


Here is the way to properly change your config on the fly:
  1. Do "/set" commands first.
  2. Then "/save" the current setup to the config file.
  3. Edit your config file ("$EDITOR $HOME/.irssi/config")
  4. "/reload" the configuration.
again, thanks to Quis!

ChanServ - Channel Permissions

+A - Access     Enables viewing of channel access lists.
+b - ban        Enables automatic kickban.
+f -            Enables modification of channel access lists.
+F - Founder    Grants full founder access.
+i - invite     Enables use of the invite and getkey commands.
+O - Op         Enables automatic op.
+o - op/deop    Enables use of the op/deop commands.
+R - Recover    Enables use of the recover and clear commands.
+r -            Enables use of the unban command.
+s - set        Enables use of the set command.
+t - topic      Enables use of the topic and topicappend commands.
+V - Voice      Enables automatic voice.
+v - voice      Enables use of the voice/devoice commands.
/msg chanserv set #channel topiclock off

Key Bindings - Reverse Search [This script requires Irssi 0.8.12-rc1 or newer.] Search within your typed history as you type (like CTRL-R in bash).
* /bind ^R /history_search
* Then type ctrl-R and type what you're searching for

Pasting Small Text

Assuming you have just a few lines in a file - you can tell irssi to dump them onto a channel:
/exec -out cat $FILE
/exec -out tail /etc/passwd
/exec -out grep sh$ /etc/passwd

irssi docs!
irssi scripts repository
cool features of irssi
Irssi (Wikibooks)
irssi startup guide
Irssi HowTo
Irssi Cheat Sheet
by Michael 'mika' Prokop 2007-07-17
A Guide to Efficiently Using Irssi and Screen
An Illustrated Guide to Split Windows in Irssi
Guide to Using Screen and Irssi - by Elizabeth Overal
The ultimate guide for UTF-8 in irssi and GNU/Screen - by Salvatore Iovene
Irssi, PuTTY, Screen & Unicode UTF-8 (anti) - by TODO

notification on X:
freenode: "using the network" - user modes and channel modes.
Scripting irssi.  An introduction.
Ten Irssi scripts you should try before you die
2008-08-13 by Anders Ossowicki (Copenhagen)

this is where i learned about "trackbar" - *very* useful to me!


to add:


$ ls -l /usr/share/doc/irssi/
-rw-r--r-- 1 root root   3920 2006-04-17 15:23 botnet.txt.gz
-rw-r--r-- 1 root root    924 2006-04-17 15:21 changelog.Debian.gz
-rw-r--r-- 1 root root 201754 2005-12-11 10:44 changelog.gz
-rw-r--r-- 1 root root   2531 2006-04-17 15:21 changelog.irssi-text.gz
-rw-r--r-- 1 root root   1999 2006-04-17 15:21 copyright
-rw-r--r-- 1 root root   1929 2006-04-17 15:23 design.txt.gz
-rw-r--r-- 1 root root   6518 2006-04-17 15:23 faq.html
-rw-r--r-- 1 root root   2695 2006-04-17 15:23 faq.txt.gz
-rw-r--r-- 1 root root   3342 2006-04-17 15:23 formats.txt
-rw-r--r-- 1 root root  15369 2006-04-17 15:23 manual.txt.gz
-rw-r--r-- 1 root root  42971 2005-12-11 10:41 NEWS.gz
-rw-r--r-- 1 root root  10747 2006-04-17 15:23 perl.txt.gz
-rw-r--r-- 1 root root   2365 2005-12-08 18:32 README.gz
-rw-r--r-- 1 root root   2341 2006-04-17 15:23 signals.txt.gz
-rw-r--r-- 1 root root   2153 2006-04-17 15:23 special_vars.txt.gz
-rw-r--r-- 1 root root  34566 2006-04-17 15:23 startup-HOWTO.html
-rw-r--r-- 1 root root  16405 2005-12-08 18:32 TODO.gz


I have changed the time format for both
the timestamp and the log_timestamp:

    timestamp_format = "%H:%M";

changed values:
    timestamp_format = "%Y-%m-%d %H:%M";
       log_timestamp = "%Y-%m-%d %H:%M:%S";

the timestamp_format does not show
the seconds while the logfile does.

the reason is simply that when i search
through the logfile with "grep" that i
want to see the dates right away without
having to find out about it manually.

and here are the commands:
  /set timestamp_format "%Y-%m-%d %H:%M"
  /set log_timestamp    "%Y-%m-%d %H:%M:%S"

now turn automatic logging on (via "autolog")
and tell irssi to use the network name as a subdirectory
and the channel/nickname as the filename:

  /set autolog on
  /set autolog_path ~/irclogs/$tag/$0.log

and dont forget to "/save" your changes!


WISH: two or more screen lines to display the input line
(probably requires a lot of wrapping of text)

Config File Editing - NOT!

why you should not edit the config file manually:
irssi offers the command "/save" to save
its current state to the config file.
and it generates it well.  so well in fact that it is
able to read it in again without any problems.

People do errors when editing.
They can create problems in syntax
which might look correct at first
but contain problems nevertheless.

So you are asked to simply use commands within irssi
(which might give off errors messages right away),
use "/save" to save the current state to file, and
use "/reload" to load the saved state back in again.

This avoids typos and a lot of debugging -
especially for the folks on the #irssi channel.

Adding comments might be fine.

Bold and Underlined Text

Write _underlined text_ between underscores - and *bold text* within asterisks.


Hilight the word "Feh" but not "Fehler":
  /hilight -regexp Feh\W
  /hilight -regexp Feh$
  /hilight -full mutt
  /hilight -full vim
  /hilight -full zsh

Rainbow Colors

The script gives you additional commands to speak in coloured letters: /rsay, /rme, /rtopic and /rkick. While this can be fun it can also quite be quite annoying to some people, eitehr because they cannot display the colour properly or because they do not like colour at all in their chat text. Therefore some channels have the "c" flag set to suppress colour codes.


Irssi Proxy by Aaron Toponce:

External Editor

Q: Can you use an external editor to edit the input line?
A: No, there is no option for that.
  (well, i dont think there is...)
But here is a workaround for you: Edit some external file with your favourite editor and then simply "paste" its contents into the current channel using "/exec -out cat $file".
/alias x /exec -out cat ~/.irssi/inputline
now choose your channel/window and paste it with "/x":
/window 23

Being Away

irssi stores special messages, such as private messages and hightlighted messages, when you are "away". you can read a summary of these when you are back. Use "/away" with some text to set your "away message", eg:
    /away gone fishin'
You will then see "zzzZZZ" in your status bar as an indication of your absense. Simply use "/away" without any parameters to "be back".