Skip to content

contrib/completions/bash: replace shebang - #5526

Merged
kolyshkin merged 1 commit into
opencontainers:mainfrom
kolyshkin:completion-shebang
Oct 15, 2026
Merged

kolyshkin merged 1 commit into
opencontainers:mainfrom
kolyshkin:completion-shebang

Conversation

@kolyshkin

Copy link
Copy Markdown
Contributor

Bash completion files are sourced rather than executed, so the shebang is not needed. It also makes linters (e.g. rpmlint) complain about a non-executable script, and Fedora's runc.spec removes it during the package build.

Replace it with a # shellcheck shell=bash directive, which serves the same purpose of indicating that this is bash code (to shellcheck, editors, and humans), and is what some other projects (e.g. systemd) use.

Fixes #1679.

Bash completion files are sourced rather than executed, so the shebang
is not needed. It also makes linters (e.g. rpmlint) complain about a
non-executable script, and Fedora's runc.spec removes it during the
package build.

Replace it with a shellcheck directive, which serves the same purpose of
indicating that this is bash code (to shellcheck, editors, and humans).

Fixes opencontainers#1679.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

@kolyshkin kolyshkin left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(review-policy job trigger)

@kolyshkin
kolyshkin merged commit 9ad879a into opencontainers:main Oct 15, 2026
92 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

shebang should be removed from bash completion

2 participants