Is there a command line switch to pass to git diff and other commands that use the less pager by default? I know these methods exist:
git diff | cat… removes all syntax highlightinggit config --global core.pager catsets the pager in the global .gitconfig tocatexport GIT_PAGER=cat
But I would prefer a command line switch.
--no-pagerto Git will tell it to not use a pager. Passing the option-Ftolesswill tell it to not page if the output fits in a single screen.Make sure that you add
--no-pageror-Pbefore your command, as ingit --no-pager log....Usage:
Other options from the comments include: