On Wed, Dec 1, 2010 at 4:13 AM, Martin Bähr <
mba...@email.archlab.tuwien.ac.at> wrote:

>
> yes, i agree, it's not good to make things complicated. to be honest
> though, i never liked the idea of using a browser for help in the first
> place. help should be simple and always work, what if no browser is
> installed at all? i'd like to see all help as text. possibly the html
> can be converted to plain text and included in that form as a backup to
> the browser help. i'd be happy to just always use a -t option to avoid
> a browser.
>
> Instead of plain text just use man pages. We already have the man pages for
the commands, which I believe are used for handling --help.

Currently the following doesn't work if we don't find the browser:
> help funcsave
> help git

The problem is that we check for the browser and fail before checking if we
have a html help topic.

For internal commands (i.e. builtins and functions) that we have a man page
for we should just use man. That way the above two examples are consistent,
we remove extra dependence on the browser, and we could remove the fragile
sed statement to find out if it is a command. This should all be done before
checking for the browser.

The browser may still be applicable for the help with no arguments, because
html is easier to navigate than a man page (see man bash for an example).
However, falling back on man pages would be ideal if no browser is
installed.

But all of this can be saved for another patch.  Keep patches simple so they
can be easily reviewed through their commit diff.

While we are on the topic of additional things to fix in help afterwards, I
am wondering why we bother checking if $XAUTHORITY being a
"$HOME/.Xauthority" OR "". Isn't it enough to just check if $DISPLAY is
non-empty, or am I missing a case.  Anyway $XAUTHORITY =
"/var/run/gdm/auth-for-dylan-0k2JS2/database" for me on debian and ubuntu,
so this condition doesn't work for me at all.
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to