From e1e4018e97a08e5eab9f18d30945a2f5fd320b06 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Thu, 17 Jul 2014 13:35:07 -0500 Subject: [PATCH] Add pretty paste option for syntax highlighted code, add docs. --- .bash_profile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.bash_profile b/.bash_profile index e4daa47..1d30c35 100644 --- a/.bash_profile +++ b/.bash_profile @@ -35,10 +35,17 @@ function route_delete() { } # Route IRC traffic through one of my servers. +# Use SOCKS5 settings 'localhost' and 6667 for server/port. function irc_proxy() { ssh -vD 6667 geerlingguy@atl1.servercheck.in } +# Syntax-highlight code for copying and pasting. +# Requires highlight (`brew install highlight`). +function pretty() { + pbpaste | highlight --syntax=$1 -O rtf | pbcopy +} + # Git aliases. alias gs='git status' alias gc='git commit'