My urfave/cli version is
v3 (latest)
Checklist
Dependency Management
- My project is using go modules.
Describe the bug
The bash completion script from urfave cli includes #!/bin/bash on line 1, but bash completion files are sourced (not executed) and should not have a shebang.
To reproduce
myapp completion bash > completion.bash
Observed behavior
Expected behavior
No shebang - the file should start with a comment or completion code directly.
Additional context
The shebang is in autocomplete/bash_autocomplete.
So for example when building packages with Debian's lintian warns: bash-completion-with-hashbang - "This file starts with the #! sequence that marks interpreted scripts, but it is a bash completion script that is merely intended to be sourced."
Want to fix this yourself?
Sadly not currently
Run go version and paste its output here
go version go1.25.0 linux/amd64
Run go env and paste its output here
N/A - issue is in the template file, not Go environment
My urfave/cli version is
v3 (latest)
Checklist
Dependency Management
Describe the bug
The bash completion script from urfave cli includes
#!/bin/bashon line 1, but bash completion files are sourced (not executed) and should not have a shebang.To reproduce
myapp completion bash > completion.bashObserved behavior
Expected behavior
No shebang - the file should start with a comment or completion code directly.
Additional context
The shebang is in
autocomplete/bash_autocomplete.So for example when building packages with Debian's lintian warns: bash-completion-with-hashbang - "This file starts with the #! sequence that marks interpreted scripts, but it is a bash completion script that is merely intended to be sourced."
Want to fix this yourself?
Sadly not currently
Run
go versionand paste its output hereRun
go envand paste its output here