On Sun, Nov 02, 2008 at 07:45:57PM -0700, Jason Dagit wrote:
> On Sun, Nov 2, 2008 at 6:45 PM, Trent W. Buck <[EMAIL PROTECTED]> wrote:
>> John Clayton <[EMAIL PROTECTED]> writes:
>>
>>> Just installed darcs 2.1 and now I get this on quitting each
>>> invocation of darcs help command_name:
>>>
>>> Command not found:
>>>    ["less -X"]
>>>
>>> In my environment I have PAGER='less -X' because I like to leave
>>> stuff on the screen for reference.
>>>
>>> Obviously this is not interacting well with darcs' use of
>>> less. Does anyone know a way to fix this?
>>
>> If convention is actually to allow PAGER to contain arguments,
>> extend Darcs to apply something like words :: String -> [String] to
>> $PAGER before executing it.
>
> It seems quite reasonable to me to allow arguments using words or do
> white space stripping.

Is it also reasonable to allow colon-separated alternatives?

    PAGER=w3m:less:more:cat

Is the contents of LESS supposed to be just broken at whitespace, or
actually interpreted by the shell?

    # if in M-x shell, prefer cat.
    PAGER='${INSIDE_EMACS-cat:}:less -F:more'

> Does this have the potential to cause problems?  I guess the most
> obvious downside is that it gives some expectation to users that
> we'll handle commands appropriately across platforms.  What do
> others think?

If darcs interprets PAGER differently to other utilities, then
attempting to use these features will cause problems -- either in
Darcs or in the other utility.  This is why I asked about convention.

IME, expecting VISUAL, EDITOR, BROWSER or PAGER to support anything
other than a single word (naming the executable in $PATH to run) is a
recipe for disaster.  You'll note that this is how Darcs treats
$VISUAL/$EDITOR, too -- as a single executable name without arguments
or alternatives.

I advocate leaving things as they are.  Particularly let me reiterate
that (I believe) using PAGER=less and LESS=F should *portably* solve
the original poster's problem.

PS: however, we could easily make the error more comprehensible,
because non-Haskell-speaking users probably won't realize that Darcs
is trying to find a file called "less -X" in $PATH.
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to