palmetto / palm-cli

Palm CLI - the tool-belt for data teams
https://palm-cli.readthedocs.io/en/latest/
Apache License 2.0
47 stars 8 forks source link

Bash and / or Zsh completion #55

Open emekdahl-palmetto opened 2 years ago

emekdahl-palmetto commented 2 years ago

Context What are you trying to do and how would you want to do it differently? Is it something you currently cannot do?

I want to have the same bash / zsh completion when I shell in using docker that I would on my local

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I want to run commands as fast as I can on my local dbt project outside of docker and have access to the history

Describe the solution you'd like A clear and concise description of what you want to happen.

Something like this in the docker file? This is just an inspiration not an implementation.

RUN echo 'source /usr/share/bash-completion/bash_completion' >> /etc/bash.bashrc

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

Is there an existing feature request for this?

jakeberesford-palmetto commented 2 years ago

Implementing this requires shell-specific changes to the Dockerfile, depending on the team/user's shell of choice. Different shells would require different implementations and I don't think I've ever seen a totally successful one. Implementations I've seen use COPY to pull in the shell profile, some use volume mounts, and some require apt-get to install the shell and any dependencies.

I think these changes would be within the scope of each project, rather than palm-cli.

One thing to keep in mind that the built image would be created with the local user's config, so an image built in CI and deployed to prod would have a different shell setup than the images built locally. And images built on my machine would no longer be the same as images built on yours. I prefer to have a minimal but consistent shell setup across all images, to reduce frustration when debugging a deployed image or production issue.