Skip to content

Instantly share code, notes, and snippets.

@mikeananev
Created May 3, 2021 07:50
Show Gist options
  • Save mikeananev/d0e25b54e1c24f5763eaf845f5b1dd60 to your computer and use it in GitHub Desktop.
Save mikeananev/d0e25b54e1c24f5763eaf845f5b1dd60 to your computer and use it in GitHub Desktop.
MacOS mc Midnight commander open jar file
# jar
shell/i/.jar
Open=%cd %p/uzip://
View=%view{ascii} /usr/local/Cellar/midnight-commander/4.8.26/libexec/mc/ext.d/archive.sh view zip
# jar
type/i/^jar\ archive
Open=%cd %p/uzip://
View=%view{ascii} /usr/local/Cellar/midnight-commander/4.8.26/libexec/mc/ext.d/archive.sh view zip
@mikeananev
Copy link
Author

just put these lines into ~/.config/mc/mc.ext

@mikeananev
Copy link
Author

From version 4.8.27 the config format has changed.
Now we must copy mc.ext.ini file from /opt/homebrew/Cellar/midnight-commander/4.8.31/etc/mc to ~/.config/mc/ folder and add the following strings right after [zip-by-shell] section:

[jar-by-shell]
Shell=.jar
ShellIgnoreCase=true
Open=%cd %p/uzip://
View=%view{ascii} /opt/homebrew/Cellar/midnight-commander/4.8.31/libexec/mc/ext.d/archive.sh view zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment