Merge pull request #1 from Tarsenicum/docker-patch-2

feat(docker): add `dxcbash` custom function
This commit is contained in:
baltic-tea 2024-11-10 15:57:05 +03:00 committed by GitHub
commit 137c7e46bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View file

@ -87,6 +87,7 @@ zstyle ':omz:plugins:docker' legacy-completion yes
## Custom functions (pseudo-aliases)
| Name | Function | Description |
| :---- | :----------------------------------------- | :-------------------------------------------------------- |
| dxcsh | `dxcsh() { docker exec -it "$@" /bin/sh }` | Run a interactive shell inside a running docker container |
| Name | Function | Description |
| :------ | :--------------------------------------------- | :-------------------------------------------------------- |
| dxcsh | `dxcsh() { docker exec -it "$@" /bin/sh }` | Run a interactive shell inside a running docker container |
| dxcbash | `dxcbash() { docker exec -it "$@" /bin/bash }` | Run a interactive bash inside a running docker container |

View file

@ -41,6 +41,7 @@ alias dxc='docker container exec'
alias dxcit='docker container exec -it'
dxcsh() { docker exec -it "$@" /bin/sh }
dxcbash() { docker exec -it "$@" /bin/bash }
if (( ! $+commands[docker] )); then
return