DEV Community

Discussion on: Bash Functions and Aliases for the Beginning Docker Developer

Collapse
 
ericdraken profile image
Eric Draken

With Docker (e.g. your deb alias), you would want to [tab][tab] container names and image ids, would you not?

Thread Thread
 
argherna profile image
Andy Gherna

Sure, that'd be great! But again, that's more effort than the beginning Docker user might do. The expert Bash user could make that happen. Again, bash-completion would be the right thing here, not these aliases and functions.

Where this post was coming from was my work on a recent sprint our team was doing to prove a concept with our web ISO. I had to learn how to use Docker and get my work done. There wasn't time for me to go into doing much more than what I did and be able to get my work done on time and this was a reasonable compromise for me.

Thread Thread
 
ericdraken profile image
Eric Draken

Docker has bash completion already, thankfully. The trick is to get the aliases to ride the coat tails of the original functions for bash completion. It turns out it isn't that hard to coax them. If you're interested, here is how I figured it out: stackoverflow.com/questions/477816...