Re: [PATCH 5/6] am: Fix launching of pager

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

> diff --git a/git-sh-setup.sh b/git-sh-setup.sh
> index d56426d..f3b5237 100755
> --- a/git-sh-setup.sh
> +++ b/git-sh-setup.sh
> @@ -107,6 +107,22 @@ git_editor() {
>  	eval "$GIT_EDITOR" '"$@"'
>  }
>  
> +git_pager() {
> +	if test -z "${GIT_PAGER+set}"
> +	then
> +		if tty <&1 >/dev/null 2>/dev/null
> +		then
> +			GIT_PAGER=cat
> +		else
> +			GIT_PAGER=$(git var GIT_PAGER)
> +		fi
> +	fi
> +	: ${LESS=-FRSX}
> +	export LESS
> +
> +	eval "$GIT_PAGER" '"$@"'
> +}
> +

I didn't read other patches, but I think this is a good change.

Acked-by: Junio C Hamano <gitster@xxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]