1
0
mirror of https://github.com/systemd/systemd.git synced 2025-11-09 04:24:06 +03:00

profile: do not prompt OSC sequences when running on a dumb terminal

This commit is contained in:
Yu Watanabe
2025-08-11 16:41:29 +09:00
parent cace9cf6f6
commit f79f89c202

View File

@@ -53,7 +53,7 @@ __systemd_osc_context_precmdline() {
read -r systemd_osc_context_cmd_id </proc/sys/kernel/random/uuid
}
if [[ -n "${BASH_VERSION:-}" ]]; then
if [[ -n "${BASH_VERSION:-}" ]] && [[ "${TERM:-}" != "dumb" ]]; then
# Whenever a new prompt is shown close the previous command, and prepare new command
PROMPT_COMMAND+=(__systemd_osc_context_precmdline)