Skip to content

Instantly share code, notes, and snippets.

@lance
Last active August 31, 2017 16:01
Show Gist options
  • Save lance/4ec3211e6eded4ff168089a89d287aa8 to your computer and use it in GitHub Desktop.
Save lance/4ec3211e6eded4ff168089a89d287aa8 to your computer and use it in GitHub Desktop.
Using minishift commands to set up a development environment in fish shell
function minishift_oc_env
set -x PATH (command minishift oc-env | head -1 | cut -f2 -d\" | cut -f1 -d:) $PATH
end
function minishift_docker_env
for var in (command minishift docker-env)
set var (command echo $var | cut -f2 -d' ' | cut -f1,2 -d= | tr '=' '\n')
if test (count $var) -eq 2
set -g -x {$var[1]} (command echo $var[2] | tr -d '"')
end
end
end
@lance
Copy link
Author

lance commented Aug 31, 2017

Here is the output from the minishift oc-env and minishift docker-env commands.

~ minishift docker-env
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.104:2376"
export DOCKER_CERT_PATH="/Users/lanceball/.minishift/certs"
export DOCKER_API_VERSION="1.24"
# Run this command to configure your shell:
# eval $(minishift docker-env)
~ minishift oc-env
export PATH="/Users/lanceball/.minishift/cache/oc/v1.5.1:$PATH"
# Run this command to configure your shell:
# eval $(minishift oc-env)

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