Browse Source

Allow multiple : in command name

pull/2/head
Luke Childs 8 years ago
parent
commit
5068b1dca6
  1. 2
      zsh-better-npm-completion.plugin.zsh

2
zsh-better-npm-completion.plugin.zsh

@ -22,7 +22,7 @@ _zbnc_parse_package_json_for_script_suggestions() {
sed -nE '/^ "scripts": \{$/,/^ \},?$/p' | # Grab scripts object
sed '1d;$d' | # Remove first/last lines
sed -E 's/ "([^"]+)": "([^"]+)",?/\1:$ \2/' | # Parse commands into suggestions
sed 's/\(:\)[^ ]*:/\\&/' # Escape ":" in commands
sed 's/\(:\)[^\$]/\\&/g' # Escape ":" in commands
}
_zbnc_npm_install_completion() {

Loading…
Cancel
Save