Midnight Commander

Midnight Commander

 mc

GNU Midnight Commander nije prepun opcija ali je pravi cross-platform a i console aplikacija je pa kao takav definitivno može da se koristi na najviše mesta. Međutim, od naprednih operacija poseduje samo S/FTP operacije i Hotlist, dok ostale stvari +, logično, treba raditi kroz obične console komande. Repo je na MidnightCommander/mc: Midnight Commander’s repository i svejedno ga svrstavam vrlo visoko kao dual-pane file manager.

Normal Backspace

Midnight Commander: go to parent directory with Backspace | The Ubuntu Incident

1
2
3
4
5
6
7
8
# za sve korisnike na sistemu
sudo sed -i -re 's/^# (CdParentSmart =.*)$/\1 backspace/gi' /etc/mc/mc.keymap

# ali je pravilnije, samo za usera
cat << EOF > ~/.config/mc/mc.keymap
[panel]
CdParentSmart = backspace
EOF

or in Windows:

1
2
3
4
5
6
7
8
# folder should already exists
mkdir "$Env:APPDATA/Midnight Commander" -Force | Out-Null

# keymap file
@"
[panel]
CdParentSmart = backspace
"@ | Add-Content -Path "$Env:APPDATA/Midnight Commander/mc.keymap" -Force

Midnight Commander installed using Scoop stores it’s key mappings in $env:userprofile\scoop\apps\mc\current\etc\mc.keymap

Normal Esc

Why does the ESC key behave funny?

To cancel things you have to press it twice ESC-ESC or wait 0.5 seconds, or use F10 to cancel. There is no way to make ESC cancel immediately! Sad.

Find-As-You-Type

Find-As-You-Type - by disabling the command line we’ll get the same behavior as Total Commander and by typing will jump us to the relevant file. You can do the same using Quick-search keys Ctrl + S or Alt + S, and that is default.

This can only can be disabled in options Options > Layout > Other Options > Command prompt and not in some config file. Posle toga, koristi Ctrl + O da pokrećeš komande.

Some Shortcuts

To show-hide Hidden files use shortcut Alt + . aka Alt + dot. To temporary hide MC and enter command in command-line, and get MC back with Ctrl + O

Language in Windows

U PowerShell-u se pokreće na lokalnom jeziku iz nekoga razloga. Pokušaji sa

# none worked
[cultureinfo]::CurrentCulture = 'de-DE'; mc
[cultureinfo]::CurrentCulture = 'de-DE'; & "$(scoop prefix mc)\mc.exe"

# because this is working
[cultureinfo]::CurrentCulture = 'en-EN'; Get-Date

# the problem is that Get-Culture and $PSCulture var reflect the culture at startup time
[cultureinfo]::CurrentCulture = 'en-EN'; $PSCULTURE

So, no way to fix this

date 29. Aug 2023 | modified 11. Sep 2024
filename: Command Line » Dual-pane File Managers » Midnight Commander