Browse Source

Wrap code in function

pull/2/head
Luke Childs 9 years ago
parent
commit
af7f13f059
  1. 6
      npm-run-completion.zsh

6
npm-run-completion.zsh

@ -1,5 +1,6 @@
filename="package.json"
dir=$PWD
_npm_run_completion() {
local filename="package.json"
local dir=$PWD
while [ ! -e "$dir/$filename" ]; do
dir=${dir%/*}
if [ "$dir" = "" ]; then
@ -9,3 +10,4 @@ done
if [ ! "$dir" = "" ]; then
echo "$dir/$filename";
fi
}

Loading…
Cancel
Save