Closed eggbean closed 5 months ago
I figured it out. I need to override my $LESS
with DELTA_PAGER='less -F'
, or whatever is happening, it seems to work.
`
Of course, this changed the paging behaviour for all the other git commands too, so I have used this shell function so that only git stash
is affected:
# Override $LESS to print and exit with git stash
git() {
if [[ $1 == stash ]]; then
DELTA_PAGER='less -F' command git "$@"
else
command git "$@"
fi
}
I have set
LESS=-MRQx4FX#10
in my environment and have had it like this for years.When I started using
delta
a few years ago I disabled it working ongit branch
andgit stash
, as the-F
in the$LESS
variable was not being respected so I always had to exit the short screens for those commands. I left it like this for years and forgot about it.Recently I decided that I would like to have delta format
git stash -p
, so I re-enabled delta for stashing (and branch) and have encountered this problem again withgit stash
andgit branch
.Why won't delta/less print and exit on short screens like
git stash
andgit branch
? I will have to disable delta working on these commands yet again, as it's too annoying.I'd really like to finally sort this problem out though.
(this is on Linux. I have different experience on Windows where it works as I would like it to, but I had to disable
-X
for some reason)