From fbdbd827671eb277487c32c25f32da11dbf408bb Mon Sep 17 00:00:00 2001 From: Thilo Six Date: Sun, 5 Feb 2017 11:33:15 +0100 Subject: [PATCH] fix usage of 'typeset -U' From man zsh: for variables with shared values it is therefore recommended to set the flag for all interfaces, e.g. `typeset -U PATH path'. Otherwise one of them is not unique: % echo ${parameters[path]} array-unique-special % echo ${parameters[PATH]} scalar-export-special After: % echo ${parameters[path]} array-unique-special % echo ${parameters[PATH]} scalar-export-unique-special Additionally drop a superflous for loop. --- etc/zsh/zshrc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 7b04de8..5594369 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -643,7 +643,7 @@ REPORTTIME=5 watch=(notme root) # automatically remove duplicates from these arrays -typeset -U path cdpath fpath manpath +typeset -U path PATH cdpath CDPATH fpath FPATH manpath MANPATH # Load a few modules is4 && \ @@ -3129,8 +3129,7 @@ ssl-cert-info() { } # make sure our environment is clean regarding colors -for var in BLUE RED GREEN CYAN YELLOW MAGENTA WHITE ; unset $var -builtin unset -v var +builtin unset -v BLUE RED GREEN CYAN YELLOW MAGENTA WHITE # "persistent history" # just write important commands you always need to $GRML_IMPORTANT_COMMANDS -- 2.1.4