From 7d6fdeb156c3ab3ef0153f75ea76fce8d3b207eb Mon Sep 17 00:00:00 2001 From: Bojan Vitnik Date: Sun, 22 Dec 2024 17:45:49 +0100 Subject: [PATCH] fix: workaround for motd messing up midnight commander subshell, issue #2003 (#2004) --- system_files/desktop/shared/usr/libexec/ublue-motd | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/system_files/desktop/shared/usr/libexec/ublue-motd b/system_files/desktop/shared/usr/libexec/ublue-motd index 238c9e21..bd7aa271 100755 --- a/system_files/desktop/shared/usr/libexec/ublue-motd +++ b/system_files/desktop/shared/usr/libexec/ublue-motd @@ -1,4 +1,11 @@ #!/usr/bin/bash + +# Exit immediately if this is a Midnight Commander (mc) subshell. +# Fixes issue #2003. +if [[ -n "$MC_SID" ]]; then + exit 0 +fi + escape() { sed 's/[&/\]/\\&/g' <<< "$1" }