~versable/finalterm/finalterm

« back to all changes in this revision

Viewing changes to data/Startup/preexec.bash

  • Committer: Philipp Emanuel Weidmann
  • Date: 2014-11-15 12:57:09 UTC
  • Revision ID: git-v1:39b078b2a96a5c3c9e74f92b1929f383d220ca8b
Fix #377

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
        # Given their buggy interaction between BASH_COMMAND and debug traps,
102
102
        # versions of bash prior to 3.1 can't detect this at all.
103
103
        preexec_interactive_mode=""
 
104
        # Let Final Term know that a no-op has been executed
 
105
        preexec ""
104
106
        return
105
107
    fi
106
108
 
129
131
    shopt -s extdebug > /dev/null 2>&1
130
132
 
131
133
    # Finally, install the actual traps.
132
 
    PROMPT_COMMAND="${PROMPT_COMMAND};preexec_invoke_cmd"
 
134
    # Override rather than append to PROMPT_COMMAND in order to avoid problems with
 
135
    # oddities such as the "__vte_prompt_command" present on some systems
 
136
    PROMPT_COMMAND="preexec_invoke_cmd"
133
137
    trap 'preexec_invoke_exec' DEBUG
134
138
}