[email protected]
[Top] [All Lists]

Re: the -P option

Subject: Re: the -P option
From: John F Hall
Date: Tue, 7 Mar 2006 04:22:28 +0000
On Mon, Mar 06, 2006 at 22:07:45 -0500, [email protected] wrote:

>  I would like to enable mc when I quit to stay in the <dir> I was in
>  the mc session, on the manual I read ...

My Linux (Slackware) has (effected by /etc/profile.d/mc.sh, or by an
equivalent mc.csh):

alias mc='. /usr/share/mc/bin/mc-wrapper.sh'

where that file (probably already present) is:

MC_USER=`id | sed 's/[^(]*(//;s/).*//'`
MC_PWD_FILE="${TMPDIR-/tmp}/mc-$MC_USER/mc.pwd.$$"
/usr/bin/mc -P "$MC_PWD_FILE" "[email protected]"

if test -r "$MC_PWD_FILE"; then
        MC_PWD="`cat $MC_PWD_FILE`"
        if test -n "$MC_PWD" && test -d "$MC_PWD"; then
                cd "$MC_PWD"
        fi
        unset MC_PWD
fi

rm -f "$MC_PWD_FILE"
unset MC_PWD_FILE

-- 
John F Hall
_______________________________________________
Mc mailing list
http://mail.gnome.org/mailman/listinfo/mc

<Prev in Thread] Current Thread [Next in Thread>