]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - zsh/os/rc.Darwin
Use add-zsh-hook for hook functions.
[config/dotfiles.git] / zsh / os / rc.Darwin
index 0922f1f22b8e846157944331daae1eb688205969..a910c7b8a1cfef9bba1ad6daf3200d48070cbeb4 100644 (file)
@@ -3,9 +3,12 @@
 
 # Store the current clipboard in CLIPBOARD before every command so it can be
 # used in commands.
-preexec () {
+os_darwin_preexec() {
     export CLIPBOARD="$(pbpaste)"
 }
+# Add the function as preexec hook.
+add-zsh-hook preexec os_darwin_preexec
+
 # Initialize CLIPBOARD so it's available for completion directly after
 # startup.
 CLIPBOARD=""