LogosLinuxInstaller icon indicating copy to clipboard operation
LogosLinuxInstaller copied to clipboard

Add tab-completion for CLI options, file paths, etc.

Open n8marti opened this issue 1 year ago • 6 comments

This would be muy nice to have. Need to find out what is required, though.

n8marti avatar Oct 18 '24 15:10 n8marti

Needs to be done per-shell, each shell has their own completion format/logic. I've done it before for zsh, not trivial, and would need to be kept up to date

ctrlaltf24 avatar Oct 23 '24 09:10 ctrlaltf24

Perhaps we can target just the top three or four shells? Most are probably using bash.

thw26 avatar Oct 23 '24 11:10 thw26

Keep in mind the more we have, the more we need to maintain. bash + maybe zsh if one of us uses it actively is probably good enough, it is a nice to have after all, doesn't impact our journey w/ God

ctrlaltf24 avatar Oct 23 '24 11:10 ctrlaltf24

Resources

https://stackoverflow.com/questions/187621/how-to-make-a-python-command-line-program-autocomplete-arbitrary-things-not-int

thw26 avatar Oct 26 '24 00:10 thw26

Looks like this can be done programmatically and be kept up to date! https://github.com/kislyuk/argcomplete I've seen some CLIs bundle their completion in their code (for example my_binary --generate-completion bash would generate the bash completions for use in the shell), that way it's always up to date

ctrlaltf24 avatar Oct 26 '24 07:10 ctrlaltf24

cf. https://github.com/FaithLife-Community/LogosLinuxInstaller/issues/228#issuecomment-2560594667

thw26 avatar Dec 24 '24 03:12 thw26