All the Irssi bugs should go here, please select the proper version when reporting the bug.
Please see the Irssi core http://www.irssi.org/ChangeLog for recent updates.
Please see the Irssi core http://www.irssi.org/ChangeLog for recent updates.
FS#532 - $HOME environment variable handling
Attached to Project:
Irssi core bugs
Opened by Arnaud (arnaud) - Tuesday, 25 September 2007, 22:31 GMT+2
Opened by Arnaud (arnaud) - Tuesday, 25 September 2007, 22:31 GMT+2
|
Detailsirssi doesn't handle the $HOME environment variable. The attached patch enables this behaviour, as precised in glib manual.
|
This task depends upon
Thanks for responding. In fact, in some environment, I have $HOME != passwd entry, in this context, I want irssi to look bu default for its configuration file, plugins & co. in $HOME/.irssi/ rather than 'passwd entry'/.irssi/.
[1] precise a few case that need to be handled if $HOME is prefered, I'll update the patch it deals with this this evening.
- Arnaud
[1]: http://library.gnome.org/devel/glib/stable/glib-Miscellaneous-Utility-Functions.html#g-get-home-dir
irssi is the only exception. Moreover, POSIX[1] defines $HOME as:
HOME
The system shall initialize this variable at the time
of login to be a pathname of the user's home directory
and every shell in the world will translate '~/.irssi/config'
(as indicated in irssi(1)) as '$HOME/.irssi/config', which is
different than ~foo/.irssi/config which will be expended with
the `foo''s home directory as configured in the passwd entry.
Ignoring (or bypassing it) $HOME if set is just a plain bug.
[1]: http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html
I can understand it is annoying but i would prefer not to change it since it has been in this way since the beginning.
The '--home' option is just a workaround to this bug. Such option is useless, $HOME is here to do the job.
For 99.9% of irssi's user, it won't make any difference at all as ~foo == "foo' $HOME", The remaining 0.1% is using '--home' to do what $HOME is for. So currently custom proprietary option are used and preferred over global and standard configuration ...
Your claim that irssi relies on an incorrect interpretation of the standard by glib makes no sense though. g_get_home_dir description is:
"Gets the current user's home directory as defined in the password database."
"Note that in contrast to traditional UNIX tools, this function prefers passwd entries over the HOME environment variable."
How is SUS supposed to be relevant here?
And no, the '--home' option was not meant as a workaround to this problem.
> How is SUS supposed to be relevant here?
The least I can wait from glib is to conform to standard :/
> And no, the '--home' option was not meant as a workaround to this problem.
well, both do the same job, the two following are equivalent:
$ irssi --home=/foo
$ HOME=/foo irssi