vote up 1 vote down star

How can I define settings, such as ircname, nick and such things, in .bashrc for Irssi?

flag

47% accept rate

migrated from stackoverflow.com

3 Answers

vote up 2 vote down

The settings for Irssi go in ~/.irssi/config.

However, in general, any Bash environment variable is set in ~/.bashrc like this:

export varname=value

The real question is how do you get Irssi to use those variables?

link|flag
vote up 0 vote down

While I can imagine setting alias like:

alias irssi="irssi -c some.server -n your_nick"

it doesn't make sense. Irssi is very configurable, and it has a proper config file, so why don't you use it?

For example:

Start irssi, issue /network add; /server add; /channel add commands - best if you'd set the server and channel to auto-connect and autojoin.

Then, do /save, and quit irssi.

And then restart irssi, and voila - it will autoconnect everywhere you configured it to.

If you'll have any problems, just consult docs.

link|flag
vote up 0 vote down

A much better way would be to set all these settings to your irssi config file. For example, this command will change the nickname:

/set nick Heoa

And every time you start irssi, this nickname will be used.


If you still want it - irssi supports these environment variables:

  • IRCNICK - nick
  • IRCNAME - real_name (the ircname line in /whois output)
  • IRCUSER - user_name (also called ident)
  • IRCHOST - hostname (you will probably never use this one)

Note that these environment variables are only set on the first run, and they are ignored if ~/.irssi/config exists.

link|flag

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.