An essential convenience feature every reasonable shell provides is command / file name completion (usually triggered by pressing Tab). I miss it heavily when I use command line in Midnight Commander. Is there a way to use it (other than by hiding the panels with Ctrl+O)?
Asked
Active
Viewed 1.2k times
3 Answers
32
You just need to prepend it with Esc: Esc-Tab does completion, and it will even give you a tiny dropdown if you do it twice. (That being said, you probably won't get the more fancy expansion possibilities of some shells.)

Ulrich Schwarz
- 15,989
8
There was a fix in MC 4.8.19 which makes redefining tab work
https://midnight-commander.org/ticket/3672
This config sample from the fix makes simple Tab work:
[main:empty-cmdline]
ChangePanel = tab
[main]
ChangePanel =
[input]
Complete = tab; alt-tab

weberjn
- 181
-
1put those lines into ~/.config/mc/mc.keymap https://midnight-commander.org/ticket/3664 – Winand Oct 14 '20 at 19:34
-
The mentioned feature is not implemented. The task is still new. (Tested with 4.8.24) So the solution does not work as expected. Just the lower assignment take precedence and tab now always invokes auto completion. You are no longer able to switch panels by keyboard anymore. – Marcel Nov 12 '21 at 18:24
-
@Winand and weberjn - using
mc 4.8.19
. works a treat. thanks, excellent. – J Evans Apr 17 '22 at 23:05 -
Does not work for me on 4.8.27. Do I need to do something after saving mc.keymap file? – Piotrek Jan 08 '24 at 16:02
alt-tab
, orm-tab
, whichever makes sense to you (depending on your OS). Esc is usually a reliable way when you don't havealt
ormeta
. – KFL Jul 10 '22 at 06:31