]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
Added OS specific file for Darwin computers (Mac OS X).
authorSimon Ruderich <simon@ruderich.org>
Tue, 28 Oct 2008 13:33:06 +0000 (14:33 +0100)
committerSimon Ruderich <simon@ruderich.org>
Mon, 16 Feb 2009 15:34:40 +0000 (16:34 +0100)
Store current clipboard in $CLIPBOARD for easy access.

zsh/env
zsh/os/rc.Darwin [new file with mode: 0644]
zsh/rc

diff --git a/zsh/env b/zsh/env
index e1384b00615ff6a3c30ec31c37d4996f2e07f345..ade0f315102b3b347c0d93b65370385e2be7e4e5 100644 (file)
--- 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 (file)
index 0000000..0922f1f
--- /dev/null
@@ -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 b4405066ec47509af2618e7f7c24d4ab022d0478..e7d243afbe7648004ba6b48291a669e26af7534c 100644 (file)
--- 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)//.*/}