creativeprojects / resticprofile

Configuration profiles manager and scheduler for restic backup
https://creativeprojects.github.io/resticprofile/
GNU General Public License v3.0
701 stars 33 forks source link

improve zsh shell completion #361

Open darix opened 6 months ago

darix commented 6 months ago

currently the generated zsh shell completion then calls the binary again to generate out the bash port. wouldnt it be easier to do something like this pseudocode as part of the golang code

bash_preamble + shared_completion_code + bash_trailer

zsh_preamble + shared_completion_code + zsh_trailer 

that way the zsh code completion wouldnt need to exec + eval again to include the common code.

jkellerer commented 6 months ago

To be honest, the zsh completion is a hack at the moment. After the next release, I have the plan to overhaul the completion code as we no longer depend on restic to complete restic commands. And also powershell should get support.

When this is implemented, zsh (which is also my main shell) will get direct support.