|
|
@ -21,7 +21,7 @@ _zbnc_parse_package_json_for_script_suggestions() { |
|
|
|
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 -E 's/ "([^"]+)": "(.+)",?/\1:$ \2/' | # Parse commands into suggestions |
|
|
|
sed 's/\(:\)[^$]/\\&/g' | # Escape ":" in commands |
|
|
|
sed 's/\(:\)$[^ ]/\\&/g' # Escape ":$" without a space in commands |
|
|
|
} |
|
|
|