をしようとして、確認。
$ brew info source-highlight
source-highlight: stable 3.1.8 (bottled)
Source-code syntax highlighter
https://www.gnu.org/software/src-highlite/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/source-highlight.rb
==> Dependencies
Required: boost ✘
おおっと、やっぱりか。
$ brew install source-highlight
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (caskroom/cask, homebrew/core).
==> New Formulae
<snip>
==> Installing source-highlight
==> Downloading https://homebrew.bintray.com/bottles/source-highlight-3.1.8_5.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring source-highlight-3.1.8_5.el_capitan.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
==> Summary
🍺 /usr/local/Cellar/source-highlight/3.1.8_5: 422 files, 6MB
終了。
あれ? src-hilite-lesspipe.sh
は何処?
$ find . -name src-hilite-lesspipe.sh -print 2>/dev/null
./usr/local/bin/src-hilite-lesspipe.sh
./usr/local/Cellar/source-highlight/3.1.8_5/bin/src-hilite-lesspipe.sh
へぇ、ここに配置されたのかぁ。
~/.bashrc
に、
export LESSOPEN='| /usr/local/bin/src-hilite-lesspipe.sh %s'
export LESS='-gj10 --no-init --quit-if-one-screen --RAW-CONTROL-CHARS'
を指定しました。