[darcs-users] make `darcs changes` interactive by default?
Ben Franksen
ben.franksen at online.de
Wed Nov 13 21:31:49 UTC 2013
I'm a bit late to the party, sorry, just catching up on my backlog.
As one of the people who proposed the change I am of course happy with it.
However, that doesn't mean too much, since I have been using -i as my
personal default for a very long time, so for me the change wasn't even
noticeable.
I can fully understand that some people prefer using a pager, so they can
view a full screen of changes at a time. Either way, it is just one entry in
the personal configuration to change the default. I did not propose this
change with experienced users in mind -- I mean users experienced enough
with a command line that they know how to effectively use a pager. I have
been thinking of the many very inexperienced users where I work: they are
used to Windows and quite illiterate with command line tools. I am happy if
I get one of them to even use 'darcs changes' at all. Explaining to them
that they have to add an extra '...|less' after the command (and why) is an
unnecessary distraction and just something more for them to remember.
Cheers
Ben
Gian Piero Carrubba wrote:
> * [Thu, Oct 10, 2013 at 11:10:23AM -0700] Simon Michael:
>>>Any thoughts about interactive changes by default?
>>
>>I've been living with it for several months, and I'm not a huge fan.
>
> Neither I am a huge fan, but I'm getting used and would probably leave
> it interactive. There are anyway some things that still puzzle me.
>
> 'log' isn't a real command, so i.e. I cannot type `darcs l`. I've just
> discovered that `darcs --commands` does not output 'log', so I cannot
> understand how bash can complete it, but at least bash completion works
> so that's it. Nevertheless, I would still prefer if `darcs l` worked.
>
> I'm still not really used to changes being interactive, so I often end
> up typing `changes -v`. This is annoying, especially when used with a
> selector (like '--last 1'): displays the patch then asks me if I want to
> see the patch and waits for an answer (and sometimes I don't
> see/remember about the prompt and let it waiting just to wonder some
> time after why I still have a darcs command running). I don't see why it
> should prompt the user when passed the '-v' option (but it probably
> should use a pager, see the next point).
>
> More in general, I don't like how both log and changes display the
> results. I think it has been discussed previously, but don't know what
> was the general orientation. IMHO, both commands should feed the output
> to a pager if STDOUT points to a terminal and the output is longer than
> the number of lines of the terminal (+/- a number of "courtesy lines")
> or longer than 20 lines if the terminal's height cannot be determined
> [0].
> Some examples:
> `darcs log` -> maybePager
> `log=$( darcs log )` -> STDOUT
> `darcs changes` | prompting the user -> STDOUT
> | displaying the patch -> maybePager
> `darcs log | less` -> STDOUT (then fed to the pipe by the shell)
>
> Ciao,
> Gian Piero.
>
> [0] I think the code is already (almost/all ?) in place and used i.e.
> when given the '--help' argument.
--
Ben Franksen
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachm€nts
More information about the darcs-users
mailing list