Interactive mode
slavaGanzin opened this issue · 2 comments
slavaGanzin commented
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
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
Ok, no problem.