diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-09-13 09:12:19 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-09-13 09:12:19 +0200 |
commit | 0785eda2d3691b76477be5db6a497dce14df89a3 (patch) | |
tree | 01b3339267a6cb0f7046bc1cfbe872af653738a6 /etc | |
parent | bcf7a9a31d55d6cc34b8d16778b52105f9d9024c (diff) |
Added reload function from the grml zshrc
Diffstat (limited to 'etc')
-rw-r--r-- | etc/completions/_reload | 2 | ||||
-rw-r--r-- | etc/function | 1 | ||||
-rw-r--r-- | etc/functions/reload | 11 |
3 files changed, 14 insertions, 0 deletions
diff --git a/etc/completions/_reload b/etc/completions/_reload new file mode 100644 index 0000000..ee05ab3 --- /dev/null +++ b/etc/completions/_reload @@ -0,0 +1,2 @@ +#compdef reload +_arguments -s '*::shell function:_functions' diff --git a/etc/function b/etc/function index 7fa8a1d..2c73f35 100644 --- a/etc/function +++ b/etc/function @@ -1,4 +1,5 @@ autoload chpwd extr plonkhost world-readable youtube-watch +autoload reload autoload gitd hgd autoload xexport xsource diff --git a/etc/functions/reload b/etc/functions/reload new file mode 100644 index 0000000..f4fc399 --- /dev/null +++ b/etc/functions/reload @@ -0,0 +1,11 @@ +## vim:ft=zsh +if [[ ${#*} == 0 ]] { + autoload xsource + xsource ~/.zshrc +} else { + local function + for function in $@; { + unfunction $function + autoload $function + } +} |