github ilia-maslakov/mcdev v6.0.4

3 hours ago

mc6 v6.0.4 (2026-08-31)

Major changes

Lua support is implemented as a plugin using the mc core ABI, without embedding Lua into the core. It allows scripts to extend the editor, panels, viewer and UI without adding each new feature directly to the core.

The old subshell has been replaced by mcterm. It uses the shell's real prompt and provides a single command line, scrollback, text selection and copying, line filtering, correct resize handling and sixel support. (#160 and related changes)

mcstruct is a file structure viewer with editing support. File formats are described using STL5 definitions, allowing binary data to be viewed and edited as structured fields instead of only as raw bytes. (#189)

The panel plugin API now supports seekable streams between plugins and routing through magic.ini. This allows remote archives and other supported formats to be opened directly from another plugin without downloading the whole file first. (#152)


Features

mcedit

  • Line filtering from Search and from text under the cursor. The F7 dialog gains a Filter action that hides non-matching lines using the selected search type, case, whole-word and charset options while retaining original line numbers. Alt-S removes or restores the last filter; Alt+Shift+S applies a filter using a one-line selection or the word under the cursor as the pattern. Filtering is cancellable, handles NUL bytes and integrates with folds, cursor movement and mouse hit testing. (#191, #192, #201)

  • Search starts with the selection. Opening F7 pre-fills the search string from the currently selected text while leaving it editable before the search starts. (#200)

mcview

  • Runtime file handlers and Chafa image viewing. A Lua handler can intercept opening a file in Viewer or Quick View and show a generated representation instead of the raw file contents. The Chafa handler uses this mechanism to display images; F8 switches between the image and raw file data. Animated images are limited to one frame, quoted or spaced file names are passed safely, and a short image description is shown before the picture; i opens full properties and F1 opens handler-specific help. (#168, #180, #186)

  • Sixel images in the viewer and mcterm. The terminal emulator retains sixel DCS data as pictures tied to screen rows, moves or erases it with those rows, and paints it after the screen backend refreshes. Terminal capability and cell-size probing, PTY replies and MC_SIXEL=0/1 control make the same path work for terminal-mode viewing and embedded programs. The lua-sixel handler uses Chafa to render into the available pixel viewport and falls back to image properties when Chafa or sixel is unavailable. (#181)

  • Generated ELF and Java class views. Lua handlers run readelf for ELF headers, sections, segments and dynamic data, and Procyon for Java classes, without shell interpolation. Both report progress and failure, work in Quick View where applicable, and use F8 to switch between generated and raw data. MIME probing now follows symbolic links for ELF files. (#170, #172)

  • DBF table viewer. Opens DBF files as pageable tables. Supports encoding selection, structure and record-card views, and F8 switches to raw data. Large files open immediately because records are decoded page by page. (#194)

mcterm

  • mcterm replaces the legacy subshell. Commands now go to the shell already running in the embedded terminal, and the command-line widget displays that shell's real prompt, colours and cursor instead of maintaining a parallel subshell. OSC 133 and OSC 7 marks with a session token track prompt, busy, exit and directory state. Running mc from its own terminal restores the parent panels through SIGUSR1 instead of starting another nested instance. (#160)

  • Shell-backed command-line editing and completion. At a prompt, the shell line editor owns input in both panel and full-terminal views, while mc keeps panel Enter, cd and exit behaviour where appropriate. Cursor and word motions follow the command-line keymap, pending input survives commands sent by mc, and completion is refilled and narrowed after each edit without overwriting text with a longer common prefix. (#173)

  • Bounded scrollback and navigation. Rows leaving the screen are retained under both row and cell limits. PgUp/PgDn, Shift-arrows, Home/End and the mouse wheel browse history without new output pulling the view back to the bottom; typing returns to live output, and alternate-screen programs keep their own keys. (#155)

  • Selection, copying and focus. Output can be selected with the mouse or Shift-navigation and copied with Ctrl-Insert to mc's clipfile and the system clipboard. Selections use stable terminal row IDs, so output and scrolling do not move them. A visible terminal cursor and a dedicated [mcterm] keymap and skin section support focus switching between the terminal and command line. Double click selects a word, triple click a row, and Enter copies an existing selection. (#159, #178)

  • Terminal line filter. Alt+Shift+S keeps only rows containing the selected text or word under the cursor. The snapshot remains stable while the shell prints, navigation and mouse coordinates follow the filtered rows, and Alt-S toggles it. Typing into the shell removes the filter before new output is shown. (#201)

  • Two clear operations. Ctrl-L scrolls the visible screen into history and leaves the active prompt at the bottom, so the old output remains available by scrolling back. Ctrl+Alt+L, or Ctrl+Shift+L in terminals that distinguish the combinations, clears both screen and scrollback without invalidating row IDs used by selections and filters. (#178, #202)

  • Autowrap and resize reflow. vterm implements xterm-style delayed wrap and DECAWM. Wrapped-row metadata follows rows into history, and resizing joins terminal-wrapped rows and splits them again for the new width while keeping the cursor on its character and sixel pictures with their rows. (#197)

  • Running command in the prompt. On Linux, the busy prompt shows the foreground command, with special handling for interpreters and scripts and a fallback for commands submitted by mc, instead of showing the generic background. (#167)

  • Terminal keybar and documentation. Full-screen mcterm has its own function-key bar, and the manual now documents scrollback and which keys are handled by mc or by the program running in the terminal. (#203)

Panel

  • Quick Filter. Alt+Shift+S hides non-matching panel entries as the pattern is typed. Quick Search and Quick Filter share their pattern and can switch without retyping it; filtering survives navigation, marking, mouse scrolling and view-mode changes, reports marks hidden by the filter and is removed immediately by Ctrl-G. (#169)

  • Inline Quick cd. Alt-C replaces the active panel's mini-status with a one-line input rather than opening a dialog. Tab and Shift-Tab offer only directories in a completion list above the input, Up and Down traverse history, bare names use CDPATH, and Esc restores the mini-status. (#175)

  • Per-bit permission colours. The new permission_colors option colours read, write, execute, special and absent bits independently, while the file type keeps the row colour. It works together with the existing applicable-triplet highlight and does not override cursor or marked-row colours. Five optional skin keys provide compatible defaults for existing skins. (#188)

  • Richer Find results. Found files show modification time, size and permissions using the panel formatters, dropping secondary columns on narrow terminals. Content matches are grouped by file; a [+] entry expands their line numbers and text, from where Enter, F3 and F4 act on the selected match. (#158)

  • Drive menu in the Panel menu. The existing left and right drive-menu commands are now available from the menu together with their configured shortcuts. (#146)

mcstruct

  • File structure viewer. mcstruct displays a binary file as a structure tree based on STL5 format definitions and allows individual fields to be edited. It supports Struct Look 4.00 definitions, arrays, expressions, different byte orders and structure search. A large library of format definitions is included. (#189)

Core

  • mc6-specific user directories. Configuration, data and cache move to ~/.config/mc6, ~/.local/share/mc6 and ~/.cache/mc6. On first start each old mc directory is copied when the new directory is absent; the original is deliberately left untouched. (#184)

Plugins

Lua / runtime

  • Lua extension platform. A versioned, typed host ABI exposes editor documents and transactions, panel providers and file operations, viewer sources, native UI, processes, events, completion and history. Scripts can be managed from Options, API annotations generate Markdown and JSON references, and editor examples cover common transformations without adding feature-specific code to the core. (#162)

  • Full-screen native script UI. mc.ui.screen lets a Lua script compose a status line, keybar and grid of native tables, text, labels, inputs, checkboxes and separators. Tables fetch and cache rows by page and support headers, scrolling, dynamic widths and per-cell colours; scripts receive key, action, row, toggle, resize and close events and can update a running screen. User runtime plugins are searched before system ones. (#193)

plugin API / infra

  • Seekable streams between panel plugins. A source plugin can hand another plugin an owned open/read/seek/close byte stream that remains valid after the source panel is replaced. magic.ini gains %plugin{name:operation} dispatch for Open and View, mc.ext.ini remains the fallback, and SFTP supplies cloned-session streams. This permits archives and other seekable formats to open remotely without a full pre-download. (#152)

  • Shift-F4 creation at plugin roots. List-style plugins can use Shift-F4 for their native creation action for a connection, context or repository. Cancelled and unsupported operations return distinct results, preventing the wrong panel action from being invoked. (#147)

sqlite

  • Read-only SQLite browser. Databases open as a panel hierarchy of tables and views, pages of at most 200 rows and individual rows. Schema entries are available at every level, values are rendered safely as JSON, BLOBs use a bounded hex preview, scans can be interrupted, and PRAGMA data_version avoids pointless reloads. Open and View are selected by magic.ini rather than a plugin name hardcoded into the core. (#149)

arcmc

  • Password-protected 7z archives. Encrypted 7z creation uses the external 7z program with header encryption and passes passwords non-interactively to the u7z helper. The dialogs validate which formats can encrypt and require a password when encryption is selected. Each built-in format can choose builtin, both, extern or off independently for packing and unpacking, with external fallback available where libarchive lacks a feature. (#138)

  • Runtime-defined external formats. arcmc.ini can define extensions, tools, arguments and extfs helpers without recompilation while retaining the built-in defaults, including Inno Setup through innoextract. External helpers work over plugin streams, and CdChild magic actions let Ctrl+PgDn enter an archive without changing Enter behaviour. (#187)


Fixes

mcedit

  • Correct Unicode printability after charset conversion. On a UTF-8 terminal, CP1251 and KOI8-R characters are tested as Unicode code points instead of truncating them through an 8-bit printability check, so valid characters no longer appear as dots. (#165, #213)

  • Shift-Tab with ctags enabled. The ctags plugin no longer consumes CtagsComplete when text is selected, allowing the normal block-unindent action while preserving completion with no selection. (#171)

mcterm

  • Cursor and command-line state synchronization. Changes in the shell line buffer update the terminal cursor, and terminal cursor movements update the command-line state. (#164)

  • Fresh prompts and the hidden-panel menu. Every relevant OSC 133 prompt mark updates the start of the typed line, preventing Enter after a Ctrl-O round trip from treating prompt text as a command or hiding panels. With panels hidden, an active F9 menubar now receives its keys before the terminal overlay. (#190)

  • Insert-character and insert mode. vterm implements ICH (CSI @) and IRM (CSI 4 h/l), shifting the line and filling with the current attributes, so readline edits in the middle of a command no longer overwrite the displayed text. (#195)

  • Keep the active panel when opening the overlay. Focus moves to the typing widget before panels are hidden, preventing the other panel from becoming current and receiving the shell directory when the overlay closes. (#183)

  • Pause-after-run and panel-directory handling. Commands launched from the panels now return according to the configured pause policy, mark the shell busy immediately, and distinguish the prompt after an internal cd from the prompt after the command. The shell starts in and follows the actually active panel, including mouse-driven panel changes. (#198)

  • Panel toggles from the command line. Ctrl-F1 and Ctrl-F2 are handled by mc when focus is in the command line rather than being forwarded as shell editing input. (#199)

  • Complete redraw after terminal switches. Returning from mcterm, including use of Ctrl-O in the editor and viewers, touches the whole screen so a terminal-side clear cannot leave holes where the screen library believed unchanged blank cells were still present. (#204)

Core

  • Correct rendering on 8-bit terminals. The editor and viewer distinguish between converted Unicode code points and bytes in the terminal encoding, restoring Cyrillic output across UTF-8, CP866, CP1251 and KOI8-R combinations. (#166)

  • TTY Esc and buffered input. In S-Lang, Esc now follows the configured timeout through the key trie, fixing Esc-number and double-Esc modes. In ncurses, pending input already buffered by the screen library is checked before select(), so typed characters are no longer displayed one key late. (#141)

  • Bounded extension cd paths. Extension command path construction checks lengths, uses bounded writes and guarantees NUL termination, preventing an overflow on excessively long paths. (#132)

Plugins

plugin API / infra

  • Copy complete directories out of plugin panels. The core now preserves source mode information, lets plugins with MC_PPF_COPY_TREE transfer a subtree in one pass, and otherwise walks it through existing chdir and get_items operations. F5 and F6 no longer create empty files for plugin directories, and copied files keep their listed modes. (#148)

  • Examples no longer run as installed scripts. Shipped runtime scripts and teaching examples are installed separately, so the editor-save demo cannot execute on every F2. Runtime logging also avoids writing over a live curses screen and uses MC_LOG_FILE when configured. (#196)

arcmc

  • Copy archive directories with their contents. arcmc implements the tree copy path used by F5 and F6 instead of returning an empty temporary file for a directory, and ordinary files receive the archived mode rather than the temporary file's 0600. (#143)

  • Predictable cursor after entering a directory. If a plugin does not name an entry to focus after chdir, the panel selects .. instead of preserving a same-named item from the parent listing. (#179)

git

  • Shift-F3 diffs files in commits and status. CK_ViewRaw now reaches the plugin in both file-listing views even when the first guarded handler does not support the selection, restoring the diff action instead of falling through to file viewing. (#206)

sftp / shell-link

  • Modern SSH algorithms and actionable connection errors. The build now requires libssh2 1.9, which supports ECDSA and Ed25519 host keys used by current OpenSSH servers. SFTP reports whether socket setup, handshake, authentication or session creation failed and includes the library error, while a cancelled password prompt remains a cancellation. (#177)

  • Remote owner and group over shell-link. The ls helper's numeric UID and GID fields are parsed into stat, so the panel and shfs-tool -l no longer show every remote file as owned by root. (#174)


Internal

Build and packaging

  • GLib 2.58 baseline and compatibility. Configure now states the actual minimum required by the code. Compatibility helpers supply g_memdup2, g_spawn_check_wait_status and a fallback implementation of the string operation on older GLib releases, restoring a full build and plugin loading on Debian 10 with GLib 2.58. (#163, #176)

  • Ubuntu 26.04 Mongo packaging. Package metadata, build configuration and the CI matrix now produce and exercise the Mongo plugin for Ubuntu 26.04. (#139)

Don't miss a new mcdev release

NewReleases is sending notifications on new releases.