From 5d1762783236f0a06747432841910f0ccf7068a8 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 3 Aug 2011 09:49:03 +0200 Subject: [PATCH] edalias/edfunc functions --- .zsh/zshrc/30_aliases | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.zsh/zshrc/30_aliases b/.zsh/zshrc/30_aliases index 982ddbb..a4f8a50 100644 --- a/.zsh/zshrc/30_aliases +++ b/.zsh/zshrc/30_aliases @@ -71,8 +71,16 @@ alias ftp=lftp alias mbug='bts show --mbox' alias bug='BROWSER=www-browser bts show' -# handy documentation lookup on Debian -# from http://www.michael-prokop.at/computer/config/.zshrc +edalias() { + [[ -z "$1" ]] && { echo "Usage: edalias " ; return 1 } || vared aliases'[$1]' ; +} +compdef _aliases edalias + +edfunc() { + [[ -z "$1" ]] && { echo "Usage: edfunc " ; return 1 } || zed -f "$1" ; +} +compdef _functions edfunc + doc() { cd /usr/share/doc/$1 } compdef '_files -W /usr/share/doc -/' doc -- 2.39.5