summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oh-my-zsh.sh18
-rw-r--r--plugins/npm/npm.plugin.zsh4
2 files changed, 15 insertions, 7 deletions
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
index 8e31ddd0f..6cc5ac630 100644
--- a/oh-my-zsh.sh
+++ b/oh-my-zsh.sh
@@ -11,6 +11,8 @@ fpath=($ZSH/functions $ZSH/completions $fpath)
# Load all stock functions (from $fpath files) called below.
autoload -U compaudit compinit
+: ${ZSH_DISABLE_COMPFIX:=true}
+
# Set ZSH_CUSTOM to the path where your custom config files
# and plugins exists, or else we will use the default custom/
if [[ -z "$ZSH_CUSTOM" ]]; then
@@ -62,13 +64,17 @@ if [ -z "$ZSH_COMPDUMP" ]; then
ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
fi
-# If completion insecurities exist, warn the user without enabling completions.
-if ! compaudit &>/dev/null; then
- # This function resides in the "lib/compfix.zsh" script sourced above.
- handle_completion_insecurities
-# Else, enable and cache completions to the desired file.
+if [[ $ZSH_DISABLE_COMPFIX != true ]]; then
+ # If completion insecurities exist, warn the user without enabling completions.
+ if ! compaudit &>/dev/null; then
+ # This function resides in the "lib/compfix.zsh" script sourced above.
+ handle_completion_insecurities
+ # Else, enable and cache completions to the desired file.
+ else
+ compinit -d "${ZSH_COMPDUMP}"
+ fi
else
- compinit -d "${ZSH_COMPDUMP}"
+ compinit -i -d "${ZSH_COMPDUMP}"
fi
# Load all of the plugins that were defined in ~/.zshrc
diff --git a/plugins/npm/npm.plugin.zsh b/plugins/npm/npm.plugin.zsh
index 595105d3c..3f6fe0fb3 100644
--- a/plugins/npm/npm.plugin.zsh
+++ b/plugins/npm/npm.plugin.zsh
@@ -1,8 +1,9 @@
eval "$(npm completion 2>/dev/null)"
+# Install dependencies globally
+alias npmg="npm i -g "
# npm package names are lowercase
-# - https://twitter.com/substack/status/23122603153150361
# Thus, we've used camelCase for the following aliases:
# Install and save to dependencies in your package.json
@@ -12,6 +13,7 @@ alias npmS="npm i -S "
# Install and save to dev-dependencies in your package.json
# npmd is used by https://github.com/dominictarr/npmd
alias npmD="npm i -D "
+
# Execute command from node_modules folder based on current directory
# i.e npmE gulp
alias npmE='PATH="$(npm bin)":"$PATH"'