${PRINT_USAGE:-:} <<EOF
    env <name>        Switch to existing environment
EOF

# change to another environment (gita group/context)
# check first for staged uncommitted code in current group, warn if so
command_env() {
    debug "$FUNCNAME $@"
    local newenv="$args"
    [[ -z $newenv ]] && error "No environment name provided?!"
    if ! env_exists $args ; then
        error "Env $env does not appear to exist?"
    fi
    [[ "$newenv" == "$context" ]] && error "Already on $newenv?"
    if [[ ! $context == 'DEFAULT' ]] && [[ -z $force ]] ; then
        debug "  $FUNCNAME context=$context, Force=$force"
        local cmods=$(mods_in_group $context)
        debug "  $FUNCNAME cmods=$cmods"
        for umod in $cmods; do
            debug "  $FUNCNAME->stash_changes $umod"
            stash_changes $umod
        done
    fi
    debug "$FUNCNAME stash: $(git stash list)"
    context="$newenv"
    for mod in $(mods_in_group $newenv) ; do
        echo "$mod -> $newenv"
        co_branch $mod $newenv
    done
    gita context "$newenv"
}
return 0
