zzh@ZZHPC:~/.goenv/shims$ cat godoc #!/usr/bin/env bash set -e [ -n "$GOENV_DEBUG" ] && set -x program="${0##*/}" if [[ "$program" = "go"* ]]; then for arg; do case "$arg" in -c* | -- ) break ;; */* ) if [ -f "$arg" ]; then export GOENV_FILE_ARG="$arg" break fi ;; esac done fi export GOENV_ROOT="/home/zzh/.goenv" exec "/home/zzh/.goenv/libexec/goenv" exec "$program" "$@"
zzh@ZZHPC:~/aaa$ cat test.sh echo "***${arg}***" for arg; do echo "!!!${arg}!!!" break done for abc; do echo "###${abc}###" break done
zzh@ZZHPC:~/aaa$ ./test.sh zzz ****** !!!zzz!!! ###zzz###