summaryrefslogtreecommitdiffstats
path: root/.zsh/rc/70completion/10own_functions
diff options
context:
space:
mode:
Diffstat (limited to '.zsh/rc/70completion/10own_functions')
-rw-r--r--.zsh/rc/70completion/10own_functions14
1 files changed, 14 insertions, 0 deletions
diff --git a/.zsh/rc/70completion/10own_functions b/.zsh/rc/70completion/10own_functions
new file mode 100644
index 0000000..2be4e67
--- /dev/null
+++ b/.zsh/rc/70completion/10own_functions
@@ -0,0 +1,14 @@
+# complete my little rc function (archlinux startscripts)
+function _rc () {
+ case $CURRENT in
+ 2) compadd $(find /etc/rc.d/ -maxdepth 1 -type f -executable -printf '%f ');;
+ 3) compadd $(/etc/rc.d/$words[2] 2> /dev/null | grep -i usage | sed 's/.*{\(.*\)}/\1/' | sed 's/|/ /g');;
+ esac
+}
+compdef _rc rc
+
+# easier way to use sshfs ;)
+function _ssh-mount () {
+ compadd $(cat ${HOME}/bin/ssh-mount.sh | egrep "Servers:.*" | sed "s#echo \-e \"\${green}Servers\:\$NC##g; s#\"\;##g; s#,##g")
+}
+compdef _ssh-mount ssh-mount.sh \ No newline at end of file