Re: [PATCH 2/2] var doc: advertise current DEFAULT_PAGER and DEFAULT_EDITOR settings
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 31, 2012, 17:55 UTC
- Message-ID
- <7v1uo8k64l.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120331084453.GE4119@burratino>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 16 quoted lines
> Document the default pager and editor chosen at compile time in the > git-var(1) manpage so users curious about what command _this_ copy of > git will fall back to when EDITOR, VISUAL, and PAGER are unset can > find the answer quickly. > > In builds leaving those settings uncustomized, this patch makes the > manpage continue to say "usually vi" and "usually less" so the > formatted documentation is usable for a wide audience including users > of custom builds that change those settings. If you would like your > copy of the docs to be less noncommittal, you will need to set > DEFAULT_PAGER=less and DEFAULT_EDITOR=vi explicitly. > > Suggested-by: Junio C Hamano <gitster@pobox.com> > Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> > --- > Thanks for reading.
Thanks for a patch.
I think the Makefile patch to use "-a" takes the right approach (assuming that the name of the EDITOR/PAGER won't have funny character that would trip up AsciiDoc, which I think is a reasonably assumption), but I think even the customized package should say what it is "usually" set on other people's systems.
In other words, instead of:
Show 7 quoted lines
> `$VISUAL`, then `$EDITOR`, and then the default chosen at compile
> +ifndef::git-default-editor[]
> time, which is usually 'vi'.
> +endif::git-default-editor[]
> +ifdef::git-default-editor[]
> + time ('{git-default-editor}').
> +endif::git-default-editor[]something like:
... then the default chosen at compile time, which is usually 'vi'.
ifdef::git-default-editor[]
The build you are using chose '{git-default-editor}' as the default.
endif::git-default-editor[]may be less confusing.