diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2011-03-24 03:52:51 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2011-03-24 03:55:27 +0100 |
commit | d72a7d09a53c3c10615337a1306efb050e88eba3 (patch) | |
tree | 9df10eb4a411a076ab30b5b0013c3752500b0c26 /.zsh/zshfunctions | |
parent | 88b6f3d4f4a55ae046de0fb004671cc65db5a49d (diff) | |
download | dotfiles-d72a7d09a53c3c10615337a1306efb050e88eba3.tar.gz dotfiles-d72a7d09a53c3c10615337a1306efb050e88eba3.tar.bz2 dotfiles-d72a7d09a53c3c10615337a1306efb050e88eba3.zip |
ZSH enhancements.
Diffstat (limited to '.zsh/zshfunctions')
-rw-r--r-- | .zsh/zshfunctions | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/.zsh/zshfunctions b/.zsh/zshfunctions index 317dd96..3a10bd4 100644 --- a/.zsh/zshfunctions +++ b/.zsh/zshfunctions @@ -1,14 +1,23 @@ # Nice mappings to restart/... the services Start Stop Reload Restart () { + local SUDO + [[ $UID != 0 ]] && SUDO="sudo" $SUDO /etc/init.d/$1 ${0:l} } +# Quick find +f() +{ + echo "find . -iname \"*$1*\"" + find . -iname "*$1*" +} + # Change to the directory of a specific package _cdu () { - cd $(dirname $1) + cd ${1:h} } # unpacks a specific package |