News for hackers. Stuff that matters.
Re:Midnight Commander Tips and Tricks by karlicoss on Sunday January 30, 2022 @01:21PM (#30139610)
wondering, what do you miss in mc that you look for alternatives? (not saying mc is complete, just curious!)
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

Re:Midnight Commander Tips and Tricks by 149764 on Sunday January 30, 2022 @03:39PM (#30140864)
Fuzzy file search, the current ctrl-s implementation doesn’t quite do it for me. It would also be nice to have a shortcut, that filters current directory.
Re:Midnight Commander Tips and Tricks by sandreas on Sunday January 30, 2022 @02:46PM (#30140406)
I did not look for alternatives, but in some of the good old linux resources sometimes super new and fancy file managers come up and I took notes on these, because I always planned to develop my own file manager with terminal UI...

Especially vim shortcuts are often a thing - I personally like single file binaries that are portable, have sane defaults and easy to setup without root permissions (like lf).