MC exit dir.

Pavel Roskin proski at gnu.org
Mon Jul 15 21:46:05 UTC 2002


Hi, Dylan!

On Mon, 15 Jul 2002, Dylan Griffiths wrote:

> MC has a behaviour I really, really hate.  This behaviour is that mc
> will start in a wd, then I will move around inside the tree in mc, and
> when I exit, it will set my pwd to where mc was.  I don't want this.  
> Short of rolling back to Slackware 8's mc, or doing nasties to the
> source, is there an option to restore the non-pwd-messing behaviour?

This is done by a shell function mc(), not by Midnight Commander itself.  
Midnight Commander just reports the exit directory.  Some people like this
functionality, and that's why it's enabled by default in some
distributions.

The simplest solution is just to unset that function.  This is done (if 
you are using bash) by adding the following line to ~/.bashrc and 
~/.bash_profile:

unset -f mc

-- 
Regards,
Pavel Roskin




More information about the mc mailing list