From 11184084bcd0d67838c420bdd18f3c7922ad4993 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Fri, 14 Dec 2018 15:34:42 -0600 Subject: [PATCH] homebrew: Simplify array assignment No need for nesting array assignment only to flatten it later. --- modules/homebrew/init.zsh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/homebrew/init.zsh b/modules/homebrew/init.zsh index d078b7a..b449bac 100644 --- a/modules/homebrew/init.zsh +++ b/modules/homebrew/init.zsh @@ -45,12 +45,11 @@ alias casks='hb_deprecated brew cask search' alias caskx='brew cask uninstall' function hb_deprecated { - local cmd="${argv[3]}" - local cmd_args=( ${(@)argv:4} ) + local cmd="${@[3]}" + local cmd_args="${@:4}" printf "'brew cask %s' has been deprecated, " "${cmd}" printf "using 'brew %s' instead\n" "${cmd}" - cmd_args=( ${(@)argv:4} ) - command brew "${cmd}" ${(@)cmd_args} + command brew "${cmd}" "${=cmd_args}" }