A small function for .bashrc in order to silently export variables to environment on-the-fly.

Avoids potential secrets in history and having them visible while typing.

# Export a variable to env without echoing
function export-silent {
    local var

    var=$1
    if [[ -z "$var" ]]; then
        echo "Usage: export-silent <var-name>"
        return 1
    fi

    # shellcheck disable=SC2086
    read -rsp "gimme your secrets: " $1 && export $1
}