[darcs-users] darcs-2 help behavior

Dan Pascu dan at ag-projects.com
Sat Oct 4 00:14:58 UTC 2008


Lele Gaifax wrote:
> On Fri, 03 Oct 2008 14:58:07 +0300
> Dan Pascu <dan at ag-projects.com> wrote:
>
>   
>> Can someone please enlighten me if there is a way to disable the
>> pager, or if not could this behavior be revisited and if not
>> reverted, at least provide a way to disable it?
>>     
>
> This in my current setting, introduced in my ~/.bashrc when someone on
> #darcs suggested it to me, answering almost the same whi^H^H^Hquestion:
>
> # F: quit if input is less then one page
> # X: don't throw away the output after quit under for example xterm
> export LESS="FX"
>   

IMO this approach is flawed in many ways:

1. I may not use less as a pager
2. Those options may conflict with the options I want to use with less
3. When I quit less, only the page visible on the screen is preserved. 
If I need something that was not in that page I must go back and type 
darcs --help all over again.
4. I still need to quit the pager before I can continue, which is an 
extra unnecessary step.
5. It relies in controlling an external application (the pager) to get 
darcs behave as the user wants.

As I said, from a user interface design point of view this choice is a 
step back, which comes as a surprise to me, considering how clean, 
simple and user friendly the darcs user interface was from the 
beginning, compared to the cluttered and overloaded user interfaces of 
the other revision systems out there. This was hinting that someone 
knowledgeable in the domain did design it.

IMO this choice violates some user interface design principles:

1. It doesn't provide a simple, straightforward path to get the result I 
need. I have to navigate around it to get the result I want. From this 
point of view a --pager option or simply leaving the user to pipe to the 
pager would have been better.
2. It takes control away from the user, which is forced to take it back 
using workarounds.
3. It doesn't provide an "all choices equal" interface. It enforces one, 
making the other very difficult to access and only using workarounds.
4. It guesses what the user wants to do with the output, instead of 
allowing him to chose what to do.

I guess this one entry from the Zen of Python, summarizes well this 
situation:

"In the face of ambiguity, refuse the temptation to guess."

The software should not attempt to guess what the user wants to do with 
the output and it should be equal towards all possible uses.

I reiterate my opinion that using --pager/--no-pager would have been 
much better, as it would have allowed me to define my preferred default 
in ~/.darcs/defaults and overwrite it on the command line when needed.

Anyway, thanks Lele for the suggestion, as it hinted me to come up with 
a better workaround. If you use bash (or any other shell supporting 
aliases), then you can add this entry to ~/.bashrc:

alias darcs='PAGER=cat darcs'

Still a workaround, but I think this one is less obtrusive and 
independent of the pager used.

-- 
Dan



More information about the darcs-users mailing list