found 730527 git/1:1.8.5.2-1
tags 730527 + upstream
quit

Hi,

Olaf Meeuwissen wrote:

> Since upstream has made color.ui=auto the default, my git experience has
> suffered.  I use lv as my preferred pager and somehow that doesn't jive
> with what the various git commands feed it.  Pagination itself works but
> instead of colors I get to see control codes like below (partial output
> of git diff):
>
>   ^[[1mdiff --git a/.mailfilter b/.mailfilter^[[m
>   ^[[1mindex aa4f0b2..17e113e 100644^[[m
>   ^[[1m--- a/.mailfilter^[[m
>   ^[[1m+++ b/.mailfilter^[[m
>   ^[[36m@@ -1,11 +1,58 @@^[[m
>
> Using GIT_PAGER=more or GIT_PAGER=less works fine and show paginated,
> colored output.

Sorry for the slow reply.  Yep, I can reproduce this.  Setting
GIT_PAGER='lv -c' (-c means "allow color") works as a workaround.

Questions:

1. Git exports LESS=FRSX (-FX = do not use alternate screen; quit if less than
   one screenful of output, -R = allow ANSI escape sequences through, -S = chop
   long lines) if the LESS environment variable is unset to allow less to work
   correctly by default without extra command-line arguments.
  
   Does lv have an environment variable to allow the caller to pass in default
   settings?

2. Does lv have options analagous to less -FX to avoid pagination when there is
   less than a screenful of output?  Without that setting, commands like "git
   log --oneline -3" and "git grep -e stringappearingnowhere" use the full
   screen instead of printing their output above the command prompt, making it
   harder to copy-and-paste tidbits from output into the next command.

3. lv allows some formatting through by default (^H-based bold and underlines)
   for the sake of the "man" command.  Would it make sense for 'lv' to enable -c
   by default?

4. Other ideas?

Regards,
Jonathan


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to