jacobdeichert / mask

🎭 A CLI task runner defined by a simple markdown file
MIT License
1.1k stars 55 forks source link

Interactive mode #94

Closed slavaGanzin closed 1 year ago

slavaGanzin commented 1 year ago

Hello

I'm using this as an interactive mode for mask:

## i

> interactive command mode

~~~fish
mask (mask --introspect | fx  .commands '.map((x,i) => `${x.name.padEnd(20)}\t${x.description}`).join("\n")' | fzf --ansi --select-1 --exit-0 --preview 'mask --introspect | fx .commands ".find(x => x.name == {1})" "x=> x.script.source" |' | sed -E 's/\s+\t.+//')
~~~

If you want to test it you need https://github.com/junegunn/fzf and https://github.com/antonmedv/fx. But you got the idea.

Maybe it's something you may consider as a feature for mask itself.

jacobdeichert commented 1 year ago

Thanks for sharing this 👍. Please feel free to create a discussion so others may find this and share alternative solutions!

At this point in time I don't see a need to add an interactive mode.

slavaGanzin commented 1 year ago

Ok, no problem.