bundlewrap
bundlewrap copied to clipboard
Shell completion
Having longer node names would makes shell completion functions really useful.
Is that something on the roadmap? I've never done anything in that area but I'd be interested in checking it out (zsh user here).
One of our guys at work wrote a Bash completion package years ago. It was way too slow. 😒 Of course, we have close to 1000 nodes in our repo – it might work fine with small repos. But that’s the reason why we eventually dropped it.
Maybe we should dig up the code and see how it performs today. It was a totally different version of bw back then anyway.
(For some reason, I don’t really miss tab completion with bw. Probably because I always have an easy way to copy-paste node names (from Vim or from the prompt of a remote shell). 🤔)
Indeed, I'm currently hacking around a bit and the execution time of bw nodes is remarkably high... Maybe there is a way to cache this somehow?
I think I'd still prefer some completion rather than none. Anyway I'll try it out and report back!
Feel free, to try it out: https://github.com/tpenndorf/bundlewrap-bash-completion
Maybe this patch suits your needs? I just implemented some Bash completion with argcomplete and got this running on my maschine. I decided to pre-generate a target file list to a file to speed up the commands. This may be automated via git hooks.
0001-Add-bash-completion-including-BWTargetCompleter-clas.patch