diff --git a/zsh/nodejs.zsh b/zsh/nodejs.zsh index 7b0cdea..b72c4c8 100755 --- a/zsh/nodejs.zsh +++ b/zsh/nodejs.zsh @@ -11,26 +11,29 @@ alias cof="coffee" alias tl="tldr" install_node_global_packages () { - npm install -g \ - appcenter-cli \ - eslint \ - eslint-config-prettier \ - eslint-plugin-prettier \ - eslint_d \ - htmllint-cli \ - httpsnippet \ - javascript-typescript-langserver \ - js-beautify \ - jsonlint \ - localtunnel \ - markdown-it \ - prettier \ - stylelint \ - tslint \ - typescript \ - typescript-formatter \ - uuid-cli \ - vscode-css-languageserver-bin + local packages=( + appcenter-cli + eslint + eslint-config-prettier + eslint-plugin-prettier + eslint_d + htmllint-cli + httpsnippet + javascript-typescript-langserver + js-beautify + jsonlint + localtunnel + markdown-it + prettier + stylelint + tslint + typescript + typescript-formatter + uuid-cli + vscode-css-languageserver-bin + ) + + npm install -g "${packages[@]}" } # Load nvm if it's available diff --git a/zsh/ruby.zsh b/zsh/ruby.zsh index 86e775b..ce225e2 100755 --- a/zsh/ruby.zsh +++ b/zsh/ruby.zsh @@ -3,20 +3,23 @@ # install_ruby_global_packages () { - gem install --no-document \ - brakeman \ - 'bundler:~> 1.0' \ - 'bundler:~> 2.0' \ - bundler-audit \ - foreman \ - lunchy \ - method_source \ - pry-doc \ - rbenv-rehash \ - reek \ - rubocop \ - seeing_is_believing \ - solargraph + local packages=( + 'bundler:~> 1.0' + 'bundler:~> 2.0' + brakeman + bundler-audit + foreman + lunchy + method_source + pry-doc + rbenv-rehash + reek + rubocop + seeing_is_believing + solargraph + ) + + gem install --no-document "${packages[@]}" } # Aliases diff --git a/zsh/rust.zsh b/zsh/rust.zsh index d8710fb..473f360 100644 --- a/zsh/rust.zsh +++ b/zsh/rust.zsh @@ -8,9 +8,12 @@ if [ -d "$HOME/.cargo/bin" ]; then fi install_rust_global_packages() { - rustup component add \ - rls \ - rust-analysis \ - rust-src \ - rustfmt \ + local packages=( + rls + rust-analysis + rust-src + rustfmt + ) + + rustup component add "${packages[@]}" }