X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=zsh%2Fos%2Frc.Darwin;h=a910c7b8a1cfef9bba1ad6daf3200d48070cbeb4;hb=8d5c8c523121a417e89ad3e2ab42a2df078620a1;hp=0922f1f22b8e846157944331daae1eb688205969;hpb=405eab4d875e929911146a95366e40d4a6c5d2b2;p=config%2Fdotfiles.git diff --git a/zsh/os/rc.Darwin b/zsh/os/rc.Darwin index 0922f1f..a910c7b 100644 --- a/zsh/os/rc.Darwin +++ b/zsh/os/rc.Darwin @@ -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=""