Add copy-prev-shell-word keybinding. add Status/Start/Stop/Restart/Reload function...
authorJoerg Jaspert <joerg@ganneff.de>
Wed, 3 Apr 2013 16:44:16 +0000 (18:44 +0200)
committerJoerg Jaspert <joerg@ganneff.de>
Wed, 3 Apr 2013 16:44:16 +0000 (18:44 +0200)
.zsh/05_Functions.zsh
.zsh/55_KeyBindings.zsh

index bdf16cc..d2083f1 100644 (file)
@@ -133,3 +133,10 @@ function kill_agent() {
     kill -TERM ${SSH_AGENT_PID}
     rm -f ${_agent_ssh_env}
 }
+
+function Status Start Stop Restart Reload {
+    typeset script
+    for script in ${*}; {
+        sudo /etc/init.d/${script} ${0:l}
+    }
+}
index c25fcd1..e495624 100644 (file)
@@ -66,6 +66,9 @@ for key in "$key_info[Escape]"{K,k} bindkey -M emacs "$key" backward-kill-line
 # Redo.
 bindkey -M emacs "$key_info[Escape]_" redo
 
+# magic to rename files...
+bindkey "$key_info[Escape]m" copy-prev-shell-word
+
 # "suspend" current line
 bindkey "$key_info[Control]Z" push-input