In a script, I’m doing a git diff that I want to quickly page through. When I’m finished, the pager will exit and the script will continue.
more is great for the task, because I can space through it and it will exit at the end of the file. Unfortunately, instead of the diff colours it shows the control characters.
less shows the colours just fine, but when reaching the end of the file it does not exit, q is needed.
How do I get both colour support and exiting on last space? No external tools can be added, only what comes with a default macOS installation.