News for hackers. Stuff that matters.
Re:Midnight Commander Tips and Tricks by CyberShadow on Sunday January 30, 2022 @08:18PM (#30143290)
Things I wish mc had:

- Extensibility (e.g. Far Manager has macros, plugins, and scripting; mc has none)

- Better file system navigation (pressing Ctrl+S every time to start isearch when entering a directory is cumbersome)

- Better history (no search; the history file is clobbered on exit, overwriting other instances' history)

- Generally better ergonomics that don't rely so much on the hard-to-reach F-keys

- Things like built-in image viewer that are present in modern file managers are absent in mc

- Development velocity seems to be rather low; not sure why, perhaps because it adopted GitHub only relatively recently.

mc features that I wish other file managers had:

- Stable (no crashes)

- Packaged in all major distributions, so can be installed and used anywhere

- Fairly good performance (asynchronous listdir/stat would make this even better)

- VFS for archives and remote hosts (FUSE/sshfs can be flaky)

- File management features which are standard for Norton clones (but not for many new file managers like ranger), such as searching in files (and operating on the results)

- Runs in a terminal, so can be used via SSH

Re:Midnight Commander Tips and Tricks by karlicoss on Monday January 31, 2022 @04:05AM (#30146029)
thanks!

re: extensibility -- mc does have scripting [1] (although not sure if you meant something else)

re: image viewer -- hmm how would that work considering mc is running in terminal? I guess it could interact with some sort of modal window for file previews or something like that.

[1] https://github.com/MidnightCommander/mc/blob/master/misc/mc....

Re:Midnight Commander Tips and Tricks by CyberShadow on Monday January 31, 2022 @08:46AM (#30147776)
> re: extensibility -- mc does have scripting [1] (although not sure if you meant something else)

Scripting in the sense that the application exposes an API that scripts can interact with to query data or perform actions, usually to an equivalent capacity as to what the user could do themselves.

In the case of Far Manager, the Lua scripting API exposes the same API as for plugins, which allows complex integrations such as implementing custom UIs and VFSs.

> re: image viewer -- hmm how would that work considering mc is running in terminal? I guess it could interact with some sort of modal window for file previews or something like that.

Well, there's a whole bunch of methods. Many terminals support at least one protocol for drawing bitmaps, such as Sixel; ranger uses the simple method of overlaying an X11 window on top of the terminal emulator's.

Re:Midnight Commander Tips and Tricks by 149764 on Monday January 31, 2022 @09:12AM (#30148045)
There is a fork of mc that adds Lua scripting support [1], but it hasn’t been updated since 2016. There were also talks about merging it with mc [3], alas never happened.

[1] https://www.geek.co.il/~mooffie/mc-lua/docs/html/

[2] https://github.com/mooffie/mc

[3] https://midnight-commander.org/ticket/3745