d-ssh bash completion
This commit is contained in:
parent
ea03ebc291
commit
762e7a9b41
|
@ -1,6 +1,11 @@
|
|||
function d-ssh {
|
||||
docker exec -it $1 /bin/bash
|
||||
}
|
||||
function _d-ssh {
|
||||
local cur=${COMP_WORDS[COMP_CWORD]}
|
||||
COMPREPLY=($(compgen -o nospace -W "$(docker ps -a --format '{{.Names}}')" -- $cur))
|
||||
}
|
||||
complete -F _d-ssh d-ssh
|
||||
|
||||
function d-ps {
|
||||
docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Image}}\t{{.Status}}\t{{.CreatedAt}}" $@
|
||||
|
|
Loading…
Reference in New Issue