Though it's not documented in the man page, a quick experiment shows that mc
sets two environment variables: $MC_TMPDIR
and $MC_SID
. (It also sets $HISTCONTROL
, but that's not specific to mc
; it affects the behavior of bash, and could have been set by something other than mc
.)
If you don't want to depend on undocumented features, you can always set an environment variable yourself. For example, in bash:
mc() { MC_IS_RUNNING=1 command mc "$@" ; }
Entering a "degraded mode" is another matter; I'm not sure how you'd do that. I don't know of any way in bash to disable specified features. You could disable selected built-in commands by defining functions that override them. What features do you have in mind?