1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-12-22 17:28:01 +00:00

Fix dexec function

This commit is contained in:
Daniel Carrillo 2020-02-04 10:46:16 +01:00
parent 0577ca3b7d
commit 5b92635810

2
.zshrc
View File

@ -57,7 +57,7 @@ fzf-file-widget-hidden () {
dexec () { dexec () {
local cid local cid
local cmd=${1:-"bash"} local cmd=${1:-"bash"}
cid=$(docker ps -a | sed 1d | fzf -1 -q "$1" | awk '{print $1}') cid=$(docker ps -a | sed 1d | fzf -1 | awk '{print $1}')
[ -n "$cid" ] && docker exec -ti "$cid" $cmd [ -n "$cid" ] && docker exec -ti "$cid" $cmd
} }