Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocompletion for a just script? #2362

Open
kbd opened this issue Sep 12, 2024 · 1 comment
Open

Autocompletion for a just script? #2362

kbd opened this issue Sep 12, 2024 · 1 comment

Comments

@kbd
Copy link

kbd commented Sep 12, 2024

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 with just (thanks for that), so I rewrote it in terms of a justfile.

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 tried eval $(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 doing just [tab] when there's a justfile in the current directory.

@casey
Copy link
Owner

casey commented Sep 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants