Created
June 20, 2019 02:01
-
-
Save en30/7440ca9644d95802a5fce836b7bae833 to your computer and use it in GitHub Desktop.
This file contains 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 characters
function peco-docker-compose () { | |
local selected_dir=$(ghq list --full-path | while read repo; do [ -f "${repo}/docker-compose.yml" ] && echo "$repo"; done | peco --query "$LBUFFER") | |
if [ -n "$selected_dir" ]; then | |
docker-compose --file "${selected_dir}/docker-compose.yml" --project-name "$(basename $selected_dir)" $* | |
fi | |
} |
Author
en30
commented
Jun 20, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment