Created
December 10, 2024 15:23
-
-
Save magickatt/7b696f2d68a52667833a9c5656dec73b to your computer and use it in GitHub Desktop.
Configure source-highlight syntax highlighting for less on macOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
brew install source-highlight | |
# Tell less where source-highlight is installed | |
# https://www.gnu.org/software/src-highlite/source-highlight.html#Using-source_002dhighlight-with-less | |
export LESSOPEN="| $(brew list source-highlight | grep src-hilite-lesspipe.sh) %s" | |
export LESS=' -R ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment