I've just fired off a bunch of patches to fish-users that correct
assorted problems I ran into when installing or using fish 1.21.2. One
of them, I think, merits some additional discussion.

The current method of gettext detection, as I mentioned in my patch
notes, definitely fails on OS X and probably fails on Solaris. In both
cases, this is because their which implementations always "succeed".
My new method uses test -x to ensure that whatever which is telling us
exists is executable. This results in the following error cases:

Linux: which gettext => '', test -x '' => false
OS X/Solaris: which gettext => 'no asdf in /Users/npilon/bin
/usr/local/bin /usr/bin /bin /usr/sbin /sbin /usr/local/bin
/usr/X11R6/bin /sw/bin /opt/local/bin /sw/bin /sw/sbin
/usr/local/teTeX/bin/powerpc-apple-darwin-current /opt/local/bin',
test -x 'that big long string' => false

This relies on gettext's error message not being a valid filename,
which I HOPE is safe to assume.

Now, that said, a lot of OS X systems are going to have gettext
installed in unusual places. My system, for example, has it as
/sw/bin/gettext and /opt/local/bin/gettext, as I've got both fink and
darwinports installed. But fish, on startup, only looks in "/usr/bin
/bin /usr/sbin /sbin /usr/local/bin". I'm not sure where this is
getting set, but would more intelligent path detection (IE, adding
system-specific bin directories like /sw/bin and /opt/local/bin) be a
good thing to put at the start of share/fish/fish?

--
-Nick Pilon
N�HS^�隊X���'���u��<�ڂ�.���y�"��*m�x%jx.j���^�קvƩ�X�jب�ȧ��m�ݚ�����v&��קv�^�+����j�Z����{az����^��h��஋�n���)��{h�����ا�׫�+h�(m�����Z��jY�w��ǥrg

Reply via email to