Skip to content

Fish shell function that parses package.json to get user defined scripts and pipes them though fzf

License

Notifications You must be signed in to change notification settings

ny1am/fish-npm-scripts-autocomplete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fish-npm-scripts-autocomplete

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.

Getting Started

Prerequisites

This function heavily depends on two beautiful tools: jq and fzf. Please install them if you don't have it yet.

Installation

  1. 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
  1. 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 :)

License

MIT License. See LICENSE for more information.

About

Fish shell function that parses package.json to get user defined scripts and pipes them though fzf

Topics

Resources

License

Stars

Watchers

Forks

Languages