From 405eab4d875e929911146a95366e40d4a6c5d2b2 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Tue, 28 Oct 2008 14:33:06 +0100 Subject: [PATCH] Added OS specific file for Darwin computers (Mac OS X). Store current clipboard in $CLIPBOARD for easy access. --- zsh/env | 2 ++ zsh/os/rc.Darwin | 12 ++++++++++++ zsh/rc | 2 ++ 3 files changed, 16 insertions(+) create mode 100644 zsh/os/rc.Darwin 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)//.*/} -- 2.45.2