I vote that the pagination be off by default to preserve the existing behaviour -- terminals have been able to scroll for decades now so I don't know why systemd/git like to do this by default but it is REALLY annoying having to pipe EVERYTHING through "cat" to defeat it.

(Also, even better than scrolling -- my terminal can search forwards/backwards/copy/paste, etc, it's real handy.)

On Thu, 23 Mar 2017, Christophe Gouiran wrote:

Good morning,

I would like to implement the feature given in the title.
I'm inspired by what Git (by default ?) and Mercurial (with Pager extension 
activated) do.

I'd like to avoid typing "fossil <command> | less" everytime I notice it 
produces an output which doesn't fit in a single screen.

Find below my ideas (in no particular order).
Settings :
 1. Add a new boolean setting "Paginates commands" (it is true by default)
 2. Add a new string setting "pager-command" (it is empty by default)
 3. Add a new string setting "Commands to paginate" (default value to be 
defined)

If pager-command is empty then following pager command will be used:

 1. "more" under Windows.
 2. "less -FRSX" under any other OS.

When Fossil writes something to its standard output, then it is sent through 
the pager if (and only if) all following conditions are met:

 1. Fossil standard output is a real terminal.
 2. "Paginates commands" setting is true.
 3. Executed command is indicated in "Commands to paginate" setting.

Fossil standard error must not be paginated.


Now I'm waiting for your advices/improvements/feedbacks.

For example:

 1. Should the settings be versionnable ?
 2. Which commands to be put by default in "Commands to paginate" ?


Many thanks in advance for taking the time to participate.




_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to