@oasis-cloud/which-one

0.0.7 • Public • Published

which one

List the scripts in package.json and choose one to execute.

Read this in other languages: English | 简体中文

Install

npm install -D @oasis-cloud/which-one

Example

└─> wo 
? which one › - Use arrow-keys. Return to submit.
❯   test
    color

or

└─> wo c
? which one › - Use arrow-keys. Return to submit.
❯   color
    demo:c

If only one script exists after filtering scripts, it is executed directly.

└─> wo color

Regular Filtering

Regular matching is filtered using global matching that ignores case.

│which-one on  main 
└─> wo c
? which one › - Use arrow-keys. Return to submit.
❯   color
│which-one on  main 
└─> wo 'd.*:c'
? which one › - Use arrow-keys. Return to submit.
❯   demo:c

Options

-r

Supports the -r option, which executes the previous script.

│which-one on  main 
└─> wo 'd.*:c'
? which one › - Use arrow-keys. Return to submit.
❯   demo:c

# will execute demo:c

│which-one on  main 
└─> wo -r

Package Sidebar

Install

npm i @oasis-cloud/which-one

Weekly Downloads

0

Version

0.0.7

License

ISC

Unpacked Size

5.53 kB

Total Files

4

Last publish

Collaborators

  • oasis-labs