mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
15 lines
234 B
Bash
15 lines
234 B
Bash
mc ()
|
|
{
|
|
mkdir -p $HOME/.mc/tmp 2> /dev/null
|
|
chmod 700 $HOME/.mc/tmp
|
|
MC=$HOME/.mc/tmp/mc-$$
|
|
@prefix@/bin/mc -P "$@" > "$MC"
|
|
cd "`cat $MC`"
|
|
rm -f "$MC"
|
|
unset MC;
|
|
}
|
|
|
|
if test -n "$BASH_VERSION"; then
|
|
export -f mc
|
|
fi
|