]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - zsh/rc
zsh: Autoload zmv.
[config/dotfiles.git] / zsh / rc
diff --git a/zsh/rc b/zsh/rc
index 390ce7edba8dba58a2da6d3427f3222e4c64eb34..34dc4ed83b8fe63b836143715974ddb051fc64e0 100644 (file)
--- a/zsh/rc
+++ b/zsh/rc
@@ -76,6 +76,8 @@ fi
 # Autoload add-zsh-hook to add/remove zsh hook functions easily.
 autoload -Uz add-zsh-hook
 
+# Load zmv (zsh move) which is powerful to rename files.
+autoload zmv
 
 # HISTORY SETTINGS
 
@@ -495,8 +497,34 @@ if [[ $TERM != screen* && $TERM != 'dumb' ]]; then
 fi
 
 
-# Load rc file for current OS.
-source_config ~/.zsh os rc $(uname) nolocal
+# OS SPECIFIC SETTINGS
+
+if [[ $(uname) == Linux ]]; then
+    # Settings to create Debian packages.
+    DEBEMAIL=simon@ruderich.org
+    export DEBEMAIL
+    DEBFULLNAME="Simon Ruderich"
+    export DEBFULLNAME
+
+elif [[ $(uname) == Darwin ]]; then # Mac OS X
+    # Store the current clipboard in CLIPBOARD before every command so it can
+    # be used in commands.
+    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=""
+    export CLIPBOARD
+
+    # Fetch current URL in clipboard with wget.
+    alias wnc='wget --no-proxy $CLIPBOARD'
+fi
+
+
 # Load rc file for current hostname (first part before a dot) or rc.local.
 source_config ~/.zsh host rc ${$(hostname)//.*/}