Pam R <pamroberts@blueyonder.co.uk> writes:
/usr/bin/mc -P "$@" >"$MC"; cd "`cat $MC`";
As far as I can see, this means that when you quit from mc it changes the pwd of the calling shell to whatever mc was last looking at. Now why would anyone want to do that?
Ask Torben Fjerdingstad and Sergey. <man mc> -P At program end, the Midnight Commander will print the last working directory. This function should not be used directly, instead, it should be used from a special shell function that will automatically change the current directory of the shell to the last directory the Midnight Commander was in (thanks to Torben Fjerdingstad and Sergey for contributing this function and the code implementing this option). Source the files /opt/gnome/lib/mc/bin/mc.sh (bash and zsh users) respectively /opt/gnome/lib/mc/bin/mc.csh (tcsh users) in order to have this function defined. </man mc> The definition is in /usr/lib/mc/bin/mc.sh in SuSE 8.1. -- Alexandr.Malusek@imv.liu.se