public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail•com>
To: Git Mailing List <git@vger•kernel.org>
Subject: .gitconfig: -c core.pager='less -+F -+X' status
Date: Tue, 21 Mar 2023 15:24:53 +0100	[thread overview]
Message-ID: <92e2b9d2-e259-6bba-7080-28a01c0d323c@gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1344 bytes --]

Hi,

I wrote recently some aliases to not clutter my screen when I want to
check something quick:

$ head -n4 ~/.gitconfig 
[alias]
	df = -c core.pager='less -+F -+X' diff
	sw = -c core.pager='less -+F -+X' show
	st = -c core.pager='less -+F -+X' status

Now, `git df` and `git sw` work as expected: they open a less window,
and it's later closed with `q`, with no traces in my screen except for
the command itself.  

However, `git st` doesn't seem to work.  It prints everything to screen,
and then exits.

You can reproduce it on the command line too:

git -c core.pager='less -+F -+X' diff    # OK
git -c core.pager='less -+F -+X' show    # OK
git -c core.pager='less -+F -+X' status  # Not OK

Cheers,
Alex

P.S.:  While sometimes I want to check quick something without
cluttering my screen, I don't recommend anyone reading this to run these
aliases as a norm.  I prefer using the ones that leave traces on the
screen, since that way it's simple to recover from rebase accidents,
which at least to me, happen rather often.  This is only for cases where
I have something important on the screen which I don't want to hide
(previously, I would open a new terminal to check something quick on
git).

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2023-03-21 14:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-21 14:24 Alejandro Colomar [this message]
2023-03-21 18:42 ` .gitconfig: -c core.pager='less -+F -+X' status Jeff King
2023-03-21 19:22   ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=92e2b9d2-e259-6bba-7080-28a01c0d323c@gmail.com \
    --to=alx.manpages@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox