zsh: add sudocker
This commit is contained in:
parent
b59bc640dc
commit
d6e7058cb2
@ -99,7 +99,7 @@ bbgrep () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cgrep () {
|
cgrep () {
|
||||||
find . -name .repo -prune -o -name .git -prune -o -type f \( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.h' -o -name '*.hpp' \) -print0 | xargs -0 grep --color -n "$@"
|
find . -name .repo -prune -o -name .git -prune -o -type f \( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.h' -o -name '*.hpp' -o -name "*.ino" \) -print0 | xargs -0 grep --color -n "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
hgrep () {
|
hgrep () {
|
||||||
@ -215,6 +215,10 @@ apush() {
|
|||||||
adb root && adb wait-for-device && adb remount && adb wait-for-device && adb push $1 $2
|
adb root && adb wait-for-device && adb remount && adb wait-for-device && adb push $1 $2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sudocker(){
|
||||||
|
DOCKER_EXEC_ARGS=${DOCKER_EXEC_ARGS:--u 0}
|
||||||
|
sdocker $@
|
||||||
|
}
|
||||||
|
|
||||||
sdocker (){
|
sdocker (){
|
||||||
DOCKER_SSH_AUTH=$HOME/docker_ssh_auth
|
DOCKER_SSH_AUTH=$HOME/docker_ssh_auth
|
||||||
@ -247,7 +251,7 @@ sdocker (){
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Attach to $img"
|
echo "Attach to $img"
|
||||||
docker exec -it $img /bin/bash
|
eval docker exec ${DOCKER_EXEC_ARGS} -it $img /bin/bash
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user