[darcs-users] make `darcs changes` interactive by default?
Gian Piero Carrubba
gpiero at rm-rf.it
Tue Oct 22 06:46:51 UTC 2013
* [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
`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)
 I think the code is already (almost/all ?) in place and used i.e.
when given the '--help' argument.
More information about the darcs-users