Skip to content

Latest commit

 

History

History
64 lines (50 loc) · 1.01 KB

README-zh_CN.md

File metadata and controls

64 lines (50 loc) · 1.01 KB

which one

列出 package.json 中的 scripts,选择其中某一项运行。

Install

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

Example

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

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

过滤脚本后只有一个脚本存在则直接执行

└─> wo color

正则过滤

正则匹配采用忽略大小写的全局匹配方式进行过滤。

│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

选项

-r

支持 -r 选项,可执行上一次的 script。

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

# 执行 demo:c

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