Skip to content

Install shell completions - #154

Merged
mgoltzsche merged 1 commit into
mgoltzsche:masterfrom
cyqsimon:comp
Feb 11, 2026
Merged

Install shell completions#154
mgoltzsche merged 1 commit into
mgoltzsche:masterfrom
cyqsimon:comp

Conversation

@cyqsimon

@cyqsimon cyqsimon commented Dec 26, 2025

Copy link
Copy Markdown
Contributor

Closes #153.

One thing remaining:

In the example in README, it appears that the intended way to use the container images is to directly specify podman ... as the container command. In that case obviously these completion files wouldn't be any use. They are only useful if the user 1. installs a supported shell [bash|zsh|fish] (and bash-completion in case of bash) AND 2. shell into the container using one of said shells.

This leaves me torn on whether or not I should install those shells by default in the images. On one hand, without any supported shell included, those completion files are useless. Users will have to install the shell by themselves, which is greatly inconvenient. On the other hand, including the shells in the image would raise the image size, likely unnecessarily due to the aforementioned intended usage. Currently it's about 14MB for just bash; 46MB for bash, zsh, and fish.

TBH my opinion on this is not strong. I only use the tarball distribution so none of this really impacts me. I'd like to know what you think.

@mgoltzsche mgoltzsche left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@cyqsimon sorry, for the late PR review and thanks for your effort and patience!
I don't think it makes sense to ship the shell completions for various shells with the container image. That is because the container is usually not used interactively and otherwise it comes with a minimal shell (busybox ash), not all kinds of them. I thought you wanted to add the shell completions to the tarball only. Doing so could be done here.

However, on 2nd thought, given that the kind of shell that is used by users is very individual, I think I'd prefer just adding a paragraph to the readme explaining how to configure the shell completion for the shell they're using. After all users can easily do that by simply calling a podman command (podman completion $SHELL).

@cyqsimon

Copy link
Copy Markdown
Contributor Author

I don't think it makes sense to ship the shell completions for various shells with the container image. That is because the container is usually not used interactively and otherwise it comes with a minimal shell (busybox ash), not all kinds of them. I thought you wanted to add the shell completions to the tarball only. Doing so could be done here.

Makes sense.

However, on 2nd thought, given that the kind of shell that is used by users is very individual, I think I'd prefer just adding a paragraph to the readme explaining how to configure the shell completion for the shell they're using. After all users can easily do that by simply calling a podman command (podman completion $SHELL).

Just to clarify, are you suggesting that we forgo any code changes altogether, and instead just add some docs?

If you insist I'm okay with this too, but my first choice would be to include the scripts in the tarball. It's more likely than not that the user would want them. And there's plenty of precedents for installing the completion scripts for bash, zsh, and fish regardless of whether those shells are installed.

@mgoltzsche mgoltzsche left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Okay, fair enough, you convinced me!
Also, I just looked into the official fedora-based podman image and also found the shell completions to be present there and their paths aligned with the ones you copied them to in this PR. I guess for the cases where a user wants to use podman interactively within the container having the completions there as well is convenient and doesn't do any harm (apart from increasing the image size by 100kb).

Thanks for creating the PR!

@mgoltzsche
mgoltzsche merged commit 2f01c38 into mgoltzsche:master Feb 11, 2026
1 check passed
@cyqsimon
cyqsimon deleted the comp branch February 27, 2026 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request: add completion scripts

2 participants