Skip to content

Instantly share code, notes, and snippets.

@genie-oh
genie-oh / .myalias
Last active December 25, 2021 18:55
my favirote alias for docker (for git bash on windows)
# import this file on your ~/.bash_profile or ~/.bash_rc
# if [ -f ~/.myalias ]; then
# source ~/.myalias
# fi
# show full command & execute
alias al='_(){ CMD=$(alias | grep "alias $1=" | cut -d = -f 2- | sed "s:^.\(.*\).$:\1:"); ARG=$(echo $@ | sed "s/^$1//"); CMD="${CMD}${ARG}"; echo "execute : ${CMD}"; echo " "; bash -c "${CMD}"; };_'
# docker
alias al-dock='cat ~/.myalias | grep dock | sed "s/=/ \t\= /"'