From 0785eda2d3691b76477be5db6a497dce14df89a3 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 13 Sep 2008 09:12:19 +0200 Subject: Added reload function from the grml zshrc --- etc/completions/_reload | 2 ++ etc/function | 1 + etc/functions/reload | 11 +++++++++++ 3 files changed, 14 insertions(+) create mode 100644 etc/completions/_reload create mode 100644 etc/functions/reload 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 + } +} -- cgit v1.2.3