Skip to content

Commit 345a4d2

Browse files
committed
Remove unnecessary eval from declare_assoc for zsh
1 parent 38758bb commit 345a4d2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

call_host.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ if is_zsh; then
3333
export_func(){
3434
typeset -fx "$1" 2>/dev/null || true
3535
}
36-
# declare an associative array (zsh) - create a named array using eval so dynamic name works
36+
# declare an associative array (zsh)
3737
declare_assoc(){
38-
eval "typeset -A $1"
38+
typeset -A "$1"
3939
}
4040
# get current function name in zsh (be tolerant if indices differ)
4141
current_funcname(){

0 commit comments

Comments
 (0)