Skip to content

Commit

Permalink
npm-scripts: Saving executed command in history
Browse files Browse the repository at this point in the history
  • Loading branch information
gmatheu committed Mar 5, 2023
1 parent e2fc502 commit d48953b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions npm-scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ _npm-scripts-inline () {
}

npm-run-scripts-find () {
### Find script and execute selected script
### Find and show script name
echo $(_npm-scripts-inline | fzf) | cut -d '|' -f 1
}

npm-run-scripts () {
### Find and show script name
### Find script and execute selected script
script=$(npm-run-scripts-find)
echo "Executing -> ${script}"
print -s "npm run ${script}"
npm run ${script}
}

Expand Down

0 comments on commit d48953b

Please sign in to comment.