IT/Container

[docker-compose] 자동 완성 - bash-completion

louky 2022. 3. 28. 15:13
반응형

docker와 마찬가지로 docker-compose도 자동완성을 할 수 있다. 

 

 

설치가 안되어 있을 때... 

 

설치 방법 

curl -s -L https://raw.githubusercontent.com/docker/compose/master/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
[root@ip-172-31-23-17 ~]# ls -al /etc/bash_completion.d/docker-compose

 

[root@ip-172-31-23-17 ~]# curl -s -L https://raw.githubusercontent.com/docker/compose/master/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose

[root@ip-172-31-23-17 ~]# ls -al /etc/bash_completion.d/docker-compose
-rw-r--r-- 1 root root 13500 Mar 28 06:07 /etc/bash_completion.d/docker-compose

 

설치 완료 후 재로그인을 한다. 

[ec2-user@ip-172-31-23-17 ~]$ docker-compose
build    create   events   help     kill     pause    ps       push     rm       
scale    stop     unpause  version  config   down     exec     images   logs
port     pull     restart  run      start    top      up

 

참고 

2022.03.28 - [IT/Container] - [docker] 자동완성 - bash-completion

반응형