From df4ed0b6ebbf20a4e560c12c32f66628234227b2 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Sat, 2 Jul 2016 14:20:14 +0100 Subject: [PATCH] Realign sed comments --- zsh-better-npm-completion.plugin.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zsh-better-npm-completion.plugin.zsh b/zsh-better-npm-completion.plugin.zsh index 8a8d11a..3fc50b4 100644 --- a/zsh-better-npm-completion.plugin.zsh +++ b/zsh-better-npm-completion.plugin.zsh @@ -23,11 +23,11 @@ _zbnc_recursively_look_for() { _zbnc_parse_package_json_for_script_suggestions() { local package_json="$1" cat "$package_json" | - 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/\(:\)[^$]/\\&/g' | # Escape ":" in commands - sed 's/\(:\)$[^ ]/\\&/g' # Escape ":$" without a space in commands + 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/\(:\)[^$]/\\&/g' | # Escape ":" in commands + sed 's/\(:\)$[^ ]/\\&/g' # Escape ":$" without a space in commands } _zbnc_npm_install_completion() {