Install shell completions - #154
Conversation
There was a problem hiding this comment.
@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).
Makes sense.
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
left a comment
There was a problem hiding this comment.
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!
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] (andbash-completionin 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.