libcompose
libcompose copied to clipboard
Support Bash Completion
This idea is to add bash completion for libcompose.
Below is a bash completion example:
// press tab twice after input "docker k", "kill" is completed and containers are printed.
root@SZX1000041895:~/sleep# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d3b5210874af mbrt/golang-vim-dev:latest "/bin/bash" 2 days ago Up 2 days myvim
root@SZX1000041895:~/sleep# docker kill
d3b5210874af9c4d9fe9041a47928e551c719c2281758e73558f24234d36b807 myvim
//press tab when input "docker r", then all command that begins with "r" will be displayed.
root@SZX1000041895:~/sleep# docker help r
rename restart rm rmi run
I think https://github.com/docker/compose/tree/master/contrib/completion should work, no?
@bohai I think it should yeah (except for the docker-compose
command part :stuck_out_tongue: https://github.com/docker/compose/blob/master/contrib/completion/bash/docker-compose#L443).