Repository navigation
Add Bash shell autocompletions - #108
Conversation
|
@pavelzw @ruben-arts This is ready for review. If you'd prefer to have this have been discussed in an Issue first (there can be very good reasons for not wanting to touch or customize anything outside of what is the minimum requirements for use) I can put this into draft status and open one. |
|
As it only adds the script to the image, it shouldn't take up too much space. I would be fine with it. But I would like @pavelzw to be the deciding factor here, as they use these docker images more in the field. |
|
👋 Ping to @pavelzw for thoughts. |
|
@ruben-arts Can you approve the CI to run in the meantime? (edit: Thanks!) |
|
Sorry for the late reply The bashrc sounds like a fair change to me. Setting SHELL results in the docker image not behaving exactly like the base image which might lead to some weirdness/inconsistency down the line 🤔 WDYT of only doing the bashrc part? |
@pavelzw It isn't an issue with the base image being different. e.g. Line 2 in 643a57d already uses Bash as the default shell $ docker run --rm -ti debian:bookworm-slim
root@181caf7035f6:/# echo $SHELL
/bin/bash
root@181caf7035f6:/#It is that the Docker
— from Dockerfile So setting the e.g. The difference between $ docker run --rm -ti debian:bookworm-slim /bin/sh -c 'echo $SHELL' # no output, as not set
and $ docker run --rm -ti debian:bookworm-slim /bin/bash -c 'echo $SHELL'
/bin/bashI think I'm telling you things you already know though, so apologies if I've totally missed your point. |
|
yes but with your change, now the following would not be exactly as on the original debian/ubuntu containers: FROM ghcr.io/prefix-dev/pixi:latest
RUN echo $0this would now return Why not just do something like this instead? RUN printf '\neval "$(pixi completion --shell bash)"\n' >> /root/.bashrcthis doesn't require the SHELL to be set to |
* Add the Bash shell autocompletions to the ~/.bashrc to allow for use of tab completions while using interactively.
7c1617a to
46a1a57
Compare
To just get this in let's do this for now. Though see below for further questions.
This seems like the "correct" behavior to me. What's the practical real world reason for wanting |
|
(Also the CI needs approval to run again, sorry.) |
~/.bashrcto allow for use of tab completions while using interactively.This results in the built container image having
If updating documentation: