-
Notifications
You must be signed in to change notification settings - Fork 42
Description
Describe the bug
I noticed there's no autocompletion for protontricks in terminal, at least not on ZSH on Manjaro (I checked Bash, and it didn't work either, but I'm not sure if I did that right). I tried to generate autocompletion scripts like for any other Python project, but the resulting function initializes GUI every time I press Tab. AI claims it's because GUI initialization happens before argcomplete hooks are called in Protontricks source code.
To Reproduce
Steps to reproduce the behaviour:
- install argcomplete:
yay -S python-argcomplete - generate completion script:
register-python-argcomplete -s zsh protontricks | sudo tee /usr/share/zsh/site-functions/_protontricks - replace function names so they wouldn't collide with autocompletion for other Python tools:
sudo sed -i 's/_python_/_protontricks_/g' /usr/share/zsh/site-functions/_protontricks - re-generate completion cache:
rm -f ~/.zcompdump*; compinit - open fresh terminal
- type
protontricks(with trailing space) - press Tab (might need to press it twice)
- notice how it opens GUI
Expected behavior
Autocompletion with the list of appids for installed games, certainly not spawning windows.
System (please complete the following information):
- Distro: Manjaro 25.1.0
- Protontricks installation method:
yay -S protontricks - Protontricks version:
1.13.1 - Steam version:
1766451605(Stable Client)
Additional context
It'd be nice to get autocompletion from argcomplete, because it would always reflect what's in the code. If you aren't interested in fixing it, though, I wrote a completion script for ZSH (it's not great, but it works) that you can straight up add to this project. If you tell me how you want to deal with Makefile and different shells, I can send a PR. Don't know how completions work in Bash, Fish, or others, so that part would have to be handled by someone else.