Fish shell function that parses package.json
to get user defined scripts and pipes them though fzf.
It also detects whether you use yarn
, pnpm
, or npm
.
This function heavily depends on two beautiful tools: jq
and fzf
. Please install them if you don't have it yet.
- Download script to fish functions directory:
curl --output-dir "$HOME/.config/fish/functions" -O https://raw.githubusercontent.com/ny1am/fish-npm-scripts-autocomplete/main/npm_scripts_autocomplete.fish
- Optionally add hotkey binding to your fish config:
$HOME/.config/fish/functions/fish_user_key_bindings.fish
function fish_user_key_bindings
...
# add the line below to bind a hotkey
bind \cf npm_scripts_autocomplete # Ctrl+F
end
You can use fish_key_reader command to experiment with key bindings :)
MIT License. See LICENSE
for more information.