Skip to content

Commit

Permalink
added validation - dokcer engine exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasz Olszewski committed Jan 30, 2017
1 parent 5fccdda commit 8d1c33e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions mage2docker.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#
# Plugin for Oh-My-Zsh


_docker_get_container_name () {
docker ps | awk '{if(NR>1) print $NF}'
}
Expand All @@ -16,6 +15,7 @@ _mage2docker_mage() {
}

_mage2docker() {

local curcontext="$curcontext" state line
typeset -A opt_args

Expand Down Expand Up @@ -80,6 +80,11 @@ mage2docker () {

}

compdef _mage2docker mage2docker
if type "docker" > /dev/null; then

compdef _mage2docker mage2docker
alias m2d='mage2docker'

alias m2d='mage2docker'
else
echo "mage2docker - docker is not installed"
fi

0 comments on commit 8d1c33e

Please sign in to comment.