Open kbd opened 1 week ago
Interesting idea! I'm not sure if this is possible, but I'll leave it open in case anyone has any ideas. I don't know if zsh
or other shells can do autocompletion based on the shebang line of a binary, since in general just by knowing the shebang line, for example python
or perl
, you don't know anything about what arguments a script takes.
I've long had a
setup
program that makes symlinks to dotfiles, installs packages, etc. At some point I realized I could replace my code withjust
(thanks for that), so I rewrote it in terms of ajustfile
.Now, I want autocomplete for my
setup
script. I tried making it a just script hoping that just+zsh would work some magic, but no such luck. I triedeval $(setup --completions zsh)
on that just script, but nope. Is there a way of getting zsh to complete a just script? It works how I expect when doingjust [tab]
when there's a justfile in the current directory.