Skip to content

Commit 9d30ed1

Browse files
committed
dbash
1 parent e39b789 commit 9d30ed1

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.bashrc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,20 @@ if [ -f ~/.git-completion.bash ]; then
265265
. ~/.git-completion.bash
266266
fi
267267

268-
# Docker logs for conatiner with name
268+
# Docker logs for conatiner by name
269269
dlog() {
270270
local cid=`docker ps -a | grep $1 | awk '{print $1}'`
271271
echo "docker logs -f ${cid}"
272272
docker logs -f ${cid}
273273
}
274274

275+
# Start shell on container by name
276+
dbash() {
277+
local cid=`docker ps -a | grep $1 | awk '{print $1}'`
278+
echo "docker exec -it ${cid} /bin/sh"
279+
docker exec -it ${cid} /bin/sh
280+
}
281+
275282
alias here='open .'
276283

277284
# ln -s /Applications/MacVim.app/Contents/bin/mvim /usr/local/bin/mvim

0 commit comments

Comments
 (0)