Closed adriens closed 6 months ago
Thanks for the suggestion, so far I've been using fzf for this purpose, but agree a flag might be nice for this.
If you're curious here's my zshrc alias for fzf and xc:
x() {
xc $(xc -s | fzf --preview 'xc -d {} | glow --style dark')
}
The | glow --style dark
part is optional, but adds color to the preview.
I would love this too.
As an MVP, if I could type xc
, see the list of tasks, move up/down to select, and hit enter to run, that would be great.
If there's missing params or something, in the MVP it wouldn't work at all, and that would be fine.
I could use an alias, but I often run xc inside a bash shell created by nix develop
, or via nix shell github:joerdav/xc
etc. so my zsh aliases from my user profile aren't copied through.
I'd make the default behaviour assume that interactive is OK, and add a flag for --no-tty
etc. if, for some reason, you wanted to run xc
with no params and see a list of all the tasks.
That's a good point actually, it could be the default behaviour of xc
.
I think the Pick list bubble should suffice: https://github.com/charmbracelet/bubbles#list
I recently added telescope support for xc too when I migrated from fzf to telescope: https://github.com/joerdav/telescope-xc.nvim
The neovim plugon looks really cool :sunglasses:
I had a crack at this, seems to work well. However, one issue is tasks with inputs.
I can't see it on a branch, can I try it out?
Yes sorry! Just pushed it to the branch interactive
Planning on a merge, I just need to update docs etc. Inputs can be thought about later.
:grey_question: About
Being able to run/discover tasks in an interactive way can be very convenient.
Today, we can run
xc
to get the list of available tasks.:point_right: The purpose of this tasks is to offer a new (and cool :nerd_face: ) way to achieve this.
:dart: Feature request
The main idea would to offer a cool TUI user experience on top of
xc
with the following Charm toolsAt this end, we could run :
xc --interactive
xc -i
... and land on the following kind of user experience (eg. interactively list/run tasks):