Oh-my-fish: Midnight commander slow on changing folders

Created on 13 Oct 2016  路  6Comments  路  Source: oh-my-fish/oh-my-fish

Midnight commander as lot slower just changing folder when using omf . Not sure what is the problem.
But when use just normal fish work ok.

Try pressing [enter] in MC on folder you will see how much slow it works. Really annoying if you a lot MC.

troubleshooting

Most helpful comment

If you don't need subshell support in mc, just run it with mc -u.

All 6 comments

I'm not a MC user, but we need to investigate why the issue is happening. My only bet is that every "enter" runs a new fish shell, which can be slow depending on the number and the init time of packages you have installed.

@derekstavis I will post youtube to show you example what is happening.But yes I am thing about that two.

Here is the demonstration.

mcomfproblemtest

Your diagnosis was right -- |enter| handling in mc's src.

Question is what to do about it.

  1. You can try to open an issue in MidnightCommander's repository. I'm not sure if they can do much about it, but perhaps they will have some tips for configuring mc to run with bash as a subshell instead of fish.

  2. I can think of some ugly workarounds:
    2.1. Run mc under a different user in your group, with same permissions and same $HOME path, but a different default shell.
    2.2. Follow https://github.com/fish-shell/fish-shell/issues/1301 to wrap OMF's init script (in $OMF_PATH/init.fish) so that it only runs in an interactive session (hoping that mc actually starts fish in a non-interactive mode. I think it depends if stdin/stdout are connected to some user terminal).

  3. You can open a new issue here to address _2.2_, such that there can be an agreed method to start fish without loading OMF, and perhaps then it will be easier to solve the problem by just setting some environment variable before running mc.

If you don't need subshell support in mc, just run it with mc -u.

@krzysztof-magosa Thank you for the tip! I use mc under zsh in iTerm2 on Mac and every directory change freezes the terminal for 1-2 sec. With mc -u this doesn't happen!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nathanchere picture nathanchere  路  3Comments

Joe23232 picture Joe23232  路  4Comments

NeilResnik picture NeilResnik  路  7Comments

edoarda picture edoarda  路  7Comments

tiborsimon picture tiborsimon  路  6Comments