Last active
September 9, 2015 12:38
Revisions
-
cloud8421 revised this gist
Sep 9, 2015 . 1 changed file with 13 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,16 @@ findcontainer() { local containers container containers=$(docker-compose ps | tail -n +3 | awk '{print $1}') && container=$(echo "$containers" | fzf -x) && echo $container } dshell() { local result=$(findcontainer) docker exec -it $result /bin/bash } dlog() { local result=$(findcontainer) docker logs -f $result } -
cloud8421 created this gist
Sep 9, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ This assumes a working copy of <https://github.com/junegunn/fzf> in your `PATH` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ dshell() { local containers containers=$(docker-compose ps | tail -n +3 | awk '{print $1}') && container=$(echo "$containers" | fzf -x) && docker exec -it $container /bin/bash }