Re: Exiting into current directory



Hi,
When you browse directories in mc then exit, is there a way
to exit into the directory you were looking at instead of
where mc was started?

many linux distrubutions do something like that, where you have 
to modify the path of mc and maybe the temporary dir.

function mc()
{
    MC_PWD_FILE="${TMPDIR-/tmp}/mc-$USER/mc.pwd.$$"
    /usr/local/bin/mc -P "$MC_PWD_FILE" "$@"

    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
}

for example but this in your .profile or another file wich is  
read during startup of your shell.

regards,
christian




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]