• Jiří Techet's avatar
    Add TERM_PROGRAM to excluded environment variables for VTE · 09ee4965
    Jiří Techet yazdı
    On OS X /etc/bashrc does some Apple-terminal-specific thing:
    
    # Tell the terminal about the working directory at each prompt.
    if [ "$TERM_PROGRAM" == "Apple_Terminal" ] && [ -z "$INSIDE_EMACS" ]; then
        update_terminal_cwd() {
            # Identify the directory using a "file:" scheme URL,
            # including the host name to disambiguate local vs.
            # remote connections. Percent-escape spaces.
            local SEARCH=' '
            local REPLACE='%20'
            local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"
            printf '\e]7;%s\a' "$PWD_URL"
        }
        PROMPT_COMMAND="update_terminal_cwd; $PROMPT_COMMAND"
    fi
    
    
    This however doesn't work in VTE when Geany is started from the Terminal
    application so we get some strange prefix for the prompt. Unset the
    TERM_PROGRAM variable so it isn't set to Apple_Terminal when running
    inside VTE.
    09ee4965
vte.c 27.4 KB