« Back to Index

Export code into formatted file

View original Gist on GitHub

Export code into formatted file.sh

# copy code into your clipboard first
# then execute the following code
pbpaste | highlight --syntax=bash --out-format=rtf --output=/tmp/my-formatted-code.rtf