From c33b019fd8c97b34b18baf0c9956649e690c6f58 Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Tue, 25 Aug 2009 22:05:59 +0200 Subject: [PATCH] zshrc: remove reload() 'exec zsh' should be used for reloading the configuration, freload() for reloading function definitions. --- debian/changelog | 4 +++- etc/zsh/zshrc | 18 +----------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/debian/changelog b/debian/changelog index 113a4e2..050afad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ grml-etc-core (0.3.74) unstable; urgency=low [ Frank Terbeck ] * vimrc: merged /etc/vim/vimrc and /etc/skel/.vimrc into one file * zshrc: mark specialized run-help functions for autoloading + * zshrc: remove reload(). 'exec zsh' is a much more robust way of + reloading the configuration. [ Michael Prokop ] * /etc/grml/script-functions: replace 'type -p' with 'which'. @@ -12,7 +14,7 @@ grml-etc-core (0.3.74) unstable; urgency=low * zshrc: Removing shtgz(). shtar() does the same, just portably. * zshrc: Remove broken ytdl() function. - -- Frank Terbeck Fri, 21 Aug 2009 18:35:07 +0200 + -- Frank Terbeck Tue, 25 Aug 2009 22:06:05 +0200 grml-etc-core (0.3.73) unstable; urgency=low diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 36f54ea..ffaae2f 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2619,23 +2619,7 @@ setenv() { typeset -x "${1}${1:+=}${(@)argv[2,$#]}" } # csh compatibility #f1# Reload an autoloadable function freload() { while (( $# )); do; unfunction $1; autoload -U $1; shift; done } - -# TODO: Who really uses reload()? The proper way to reload a zsh setup is to -# actually restart the shell via 'exec zsh'. And reload with arguments is the -# same as freload() above. -ft -#f1# Reload zsh setup -reload() { - if [[ "$#*" -eq 0 ]] ; then - [[ -r ~/.zshrc ]] && . ~/.zshrc - else - local fn - for fn in "$@"; do - unfunction $fn - autoload -U $fn - done - fi -} -compdef _functions reload freload +compdef _functions freload #f1# List symlinks in detail (more detailed version of 'readlink -f' and 'whence -s') sll() { -- 2.1.4