git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: "git branch" issue in 2.16.1

From
Lars Schneider <larsxschneider@gmail.com>
Date
Feb 8, 2018, 11:27 UTC
Message-ID
<44FE6343-9236-4F50-A0C1-A70A887A8BC5@gmail.com>
In-Reply-To
<CBF51BD2-0B54-43E3-BB48-884C7DB94237@gmail.com>
Show 46 quoted lines
> On 08 Feb 2018, at 12:13, Lars Schneider <larsxschneider@gmail.com> wrote:
> 
> 
>> On 08 Feb 2018, at 09:50, Jeff King <peff@peff.net> wrote:
>> 
>> On Wed, Feb 07, 2018 at 11:20:08PM +0100, Lars Schneider wrote:
>> 
>>>> 1. You have $LESS in your environment (without "F") on one platform
>>>>   but not the other.
>>> 
>>> I think that's it. On my system LESS is defined to "-R".
>>> 
>>> This opens the pager:
>>> 
>>> 	$ echo "TEST" | less
>>> 
>>> This does not open the pager:
>>> 
>>> 	$ echo "TEST" | less -FRX
>>> 
>>> That means "F" works on macOS but Git doesn't set it because LESS is
>>> already in my environment.
>>> 
>>> Question is, why is LESS set that way on my system? I can't find
>>> it in .bashrc .bash_profile .zshrc and friends.
>> 
>> There's also /etc/bash.bashrc, /etc/profile, etc. I don't know what's
>> normal in the mac world. You can try running:
>> 
>> bash -ix 2>&1 </dev/null | grep LESS
>> 
>> to see what your startup code is doing. I don't know of a good way to
>> correlate that with the source files, though. Or even to ask bash which
>> startup files it's looking in.
> 
> Unfortunately, this command doesn't work for me.
> 
> I ask around and most of my coworkers have LESS="-R".
> Only the coworker that doesn't really use his Mac and has
> no customizations does not have $LESS defined.
> 
> Therefore, I think it is likely some third party component
> that sets $LESS.
> 
> @Jason:
> Do you have homebrew, iTerm2, and/or oh-my-zsh installed?

Ha. I found it it! It is indeed oh-my-zsh: https://github.com/robbyrussell/oh-my-zsh/blob/master/lib/misc.zsh#L23

Let's see if oh-my-zsh is willing to change that...
- Lars
Previous: Lars SchneiderNext: Kevin Daudt
Message 12 of 15 in “"git branch" issue in 2.16.1”
  1. Jason RaceyFeb 6, 2018
  2. Todd ZullingerFeb 6, 2018
  3. Stefan BellerFeb 6, 2018
  4. Lars SchneiderFeb 7, 2018
  5. Jason RaceyFeb 7, 2018
  6. Lars SchneiderFeb 7, 2018
  7. Jeff KingFeb 7, 2018
  8. Junio C HamanoFeb 7, 2018
  9. Lars SchneiderFeb 7, 2018
  10. Jeff KingFeb 8, 2018
  11. Lars SchneiderFeb 8, 2018
  12. Lars SchneiderFeb 8, 2018
  13. Kevin DaudtFeb 8, 2018
  14. Lars SchneiderFeb 8, 2018
  15. Paul SmithFeb 6, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.