2006/1/27, Isak Savo <[EMAIL PROTECTED]>:
> 2006/1/27, Axel Liljencrantz <[EMAIL PROTECTED]>:
> > 2006/1/26, Isak Savo <[EMAIL PROTECTED]>:
> > > Something like this:
> > > $ ls<TAB>
> > > ls          (List contents of directory)
> > > lsfoo     (<<No description found>>)
> > > lspci     (List all PCI devices)
> > > ...
> > >
> > > Perhaps the "No description found" part could be error colored or
> > > something. It could also be completely omitted, leaving just an empty
> > > parenthesis.
> >
> > In this particular case, that can be done. I was thinking about the
> > general case. For example, on my machine the 'locale -a' command seems
> > to outputs locale names in the native charset of the locale, which
> > will sometimes result in invalid strings. What should a command like:
> >
> > for i in (locales -a)
> >     ...
> > end
> >
> > do?
> >
> > Should it skip the the broken strings. Try to guess what they are?
> > Skip the broken characters? Maybe the whole command should fail?
>
> Why would you want to skip them? Imagine the following
> for i in (locales -a)
>    process_string($i);
> end
>
> process_string() might handle, or even depend on, $i being in weird
> charsets. I'm not familiar with the fish internals, but the logical

Just to make it clear that this can not be considered sane or desired
behaviour, since the terminal expects all output to be in the same
character set, and when it recives output in another character set,
things will look funny onscreen, with little squiggles and such.

> thing would be to not care unless the string is being printed to the
> user.
>
> Isak
>
> PS. I have no idea how other shells handle this. I'm basically arguing
> theoretical points here :-)
>


--
Axel

Reply via email to