Open gwern opened 9 years ago
Completion is controlled by the shell and not the executable. If anyone wants to contribute to e.g. the bash-completion project, this is up for grabs.
@gwern have a look at this: https://gist.github.com/izabera/3c52c084937533cf82ce it's a bash function that completes shellcheck's options, and only files that end in .sh or similar, or that have a shebang like #!/bin/bash or similar.
As a shell-oriented tool, it would be nice if shellcheck automatically provided tab-completion which focused on .sh or shell-related files. A good list (sourced from sh/bash/zsh man pages) would be:
If any files match these, they should be prioritized by the tab-completion over other files with the same prefix (ie "arbtt-classify.sh" should match 'shellcheck a\t' before matching "arbtt-classified.txt", since it's much less likely that the text file is the one I want to run shellcheck on).