diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index a1cc911..f541ca3 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -216,7 +216,6 @@ alias brewu='brew update && brew upgrade && brew cleanup && brew doctor' # emacs alias emacs="env LC_CTYPE=zh_CN.UTF-8 emacs" -alias dc='docker-compose -f docker-compose-dev.yml' alias ds='dc exec server' alias drspec='dc exec sidekiq rspec' alias psetup='dc exec sidekiq rake parallel:setup' diff --git a/zsh/functions.zsh b/zsh/functions.zsh index 9504f19..8ffb17d 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -172,3 +172,12 @@ function rgm { echo "Rip Search with $regex..." rg -U $regex } + +function dc { + if [ -e ./docker-compose-dev.yml ]; then + docker_file_path=./docker-compose-dev.yml + else + docker_file_path=~/Projects/rallets-hub/docker-compose-dev.yml + fi + docker-compose -f $docker_file_path $@ +}