2006/1/26, Philip Ganchev <[EMAIL PROTECTED]>:
> The actual completions are fine, but there is an inappropriate error message:
>
> fish> le<TAB>fish: Subshell 'apropos ^/dev/null le' returned illegal
> string, discarded one entry
> fish: Subshell 'apropos ^/dev/null le' returned illegal string,
> discarded one entry
> fish> le
> leaftoppm ...
> ...
> fish> les<TAB>fish: Subshell 'apropos ^/dev/null les' returned illegal
> string, discarded one entry
> fish> less
>
> I can't replicate this using any other input.  Due to the mention of
> 'apropos', I guessed the bug was in fish.d/completions/apropos.fish,
> but that code seems fine.
>

Fish uses the apropos command to find descriptions for command names.
The above error message means that fish fails to convert the output of
apropos to wide character strings. This is almost always caused by a
program that outputs information using another character set than the
one specified by the locale information. Usually, that means you are
using a UTF-8 locale and the program outputs ISO8859-1 data.

You can verify this by running 'apropos les' and checking for strange
characters. If that is the case, you should consider filing a
bugreport with apropos and for the package whose whatis data contains
text in the wrong character set.

Also, I'd be interested to hear peoples opinions on what fish should
do when a command substitution returns invalid output. Right now, the
whole line is discarded and an error message is printed. Some
alternatives:

* The entire command substitution fails, either with or without a warning
* Silently skip bad lines, either with or without a warning (This is
the current bahaviour, with the warning)
* Ignore only the 'broken' character, either with or without a warning
* Try using a fallback character set, either with or without a warning
(I hate to admit it, but which set to use should probably be user
configurable)

--
Axel

Reply via email to