Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Midnight commander wrapper script for the fish shell
function mc
set SHELL_PID %self
set MC_PWD_FILE "/tmp/mc-$USER/mc.pwd.$SHELL_PID"
/usr/bin/mc -P $MC_PWD_FILE $argv
if test -r $MC_PWD_FILE
set MC_PWD (cat $MC_PWD_FILE)
if test -n "$MC_PWD"
and test -d "$MC_PWD"
cd (cat $MC_PWD_FILE)
end
rm $MC_PWD_FILE
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.