From: Simon Ruderich Date: Tue, 28 Oct 2008 13:33:06 +0000 (+0100) Subject: Added OS specific file for Darwin computers (Mac OS X). X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=405eab4d875e929911146a95366e40d4a6c5d2b2;p=config%2Fdotfiles.git Added OS specific file for Darwin computers (Mac OS X). Store current clipboard in $CLIPBOARD for easy access. --- diff --git a/zsh/env b/zsh/env index e1384b0..ade0f31 100644 --- a/zsh/env +++ b/zsh/env @@ -17,5 +17,7 @@ fi # global env.local. source_config ~/.shell "" env $host +# Load rc file for current OS. +source_config ~/.zsh os env $(uname) nolocal # Load env file for current hostname (first part before a dot) or env.local. source_config ~/.zsh host env $host diff --git a/zsh/os/rc.Darwin b/zsh/os/rc.Darwin new file mode 100644 index 0000000..0922f1f --- /dev/null +++ b/zsh/os/rc.Darwin @@ -0,0 +1,12 @@ +# Zsh configuration file for darwin computers (Mac OS X). + + +# Store the current clipboard in CLIPBOARD before every command so it can be +# used in commands. +preexec () { + export CLIPBOARD="$(pbpaste)" +} +# Initialize CLIPBOARD so it's available for completion directly after +# startup. +CLIPBOARD="" +export CLIPBOARD diff --git a/zsh/rc b/zsh/rc index b440506..e7d243a 100644 --- a/zsh/rc +++ b/zsh/rc @@ -123,5 +123,7 @@ function ll() { } +# Load rc file for current OS. +source_config ~/.zsh os rc $(uname) nolocal # Load rc file for current hostname (first part before a dot) or rc.local. source_config ~/.zsh host rc ${$(hostname)//.*/}