Skip to content

Instantly share code, notes, and snippets.

@en30
Created June 20, 2019 02:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save en30/7440ca9644d95802a5fce836b7bae833 to your computer and use it in GitHub Desktop.
Save en30/7440ca9644d95802a5fce836b7bae833 to your computer and use it in GitHub Desktop.
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
}
@en30
Copy link
Author

en30 commented Jun 20, 2019

peco-docker-compose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment