fix: workaround for motd messing up midnight commander subshell, issue #2003 (#2004)

This commit is contained in:
Bojan Vitnik 2024-12-22 17:45:49 +01:00 committed by GitHub
parent e411c77017
commit 7d6fdeb156
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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"
}