dm: support des aliases pour ssh aussi
This commit is contained in:
parent
d1d32de841
commit
82a7952e2a
|
@ -7,9 +7,12 @@ if [ -n "$UTOOLS_DOCKER_ALIASES" ]; then
|
||||||
# alias dm=docker-machine
|
# alias dm=docker-machine
|
||||||
#fi
|
#fi
|
||||||
function dm() {
|
function dm() {
|
||||||
if [ "$1" == use -a -n "$2" -a -f ~/etc/default/dk ]; then
|
case "$1" in
|
||||||
|
use|ssh)
|
||||||
|
if [ -n "$2" -a -f ~/etc/default/dk ]; then
|
||||||
# chercher les aliases éventuels
|
# chercher les aliases éventuels
|
||||||
local machine="$2"; shift; shift
|
local cmd="$1"; shift
|
||||||
|
local machine="$1"; shift
|
||||||
machine="$(
|
machine="$(
|
||||||
CLUSTERDIRS=()
|
CLUSTERDIRS=()
|
||||||
DM_ALIASES=()
|
DM_ALIASES=()
|
||||||
|
@ -34,8 +37,10 @@ if [ -n "$UTOOLS_DOCKER_ALIASES" ]; then
|
||||||
done
|
done
|
||||||
echo "$machine"
|
echo "$machine"
|
||||||
)"
|
)"
|
||||||
set -- use "$machine" "$@"
|
set -- "$cmd" "$machine" "$@"
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
if [ "$DOCKER_MACHINE_WRAPPED" == true ]; then
|
if [ "$DOCKER_MACHINE_WRAPPED" == true ]; then
|
||||||
__docker_machine_wrapper "$@"
|
__docker_machine_wrapper "$@"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue