]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
profile: do not prompt OSC sequences when running on a dumb terminal
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 11 Aug 2025 07:41:29 +0000 (16:41 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 13 Aug 2025 14:43:51 +0000 (23:43 +0900)
profile.d/80-systemd-osc-context.sh

index 85983dc68d97a7d0588ef1a9a65a86858499f5cc..ee37c2507a4337eb84dd638febc75333b81ffbb2 100644 (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)