Simple two-panel file manager with viewer and editor
console applicationapt install mini-commanderMini Commander is a very simplified clone of Midnight Commander for the Linux terminal. It includes a built-in file viewer and a text editor with syntax highlighting, block operations and UTF-8 support.
Mini Commander is very simplified clone of Midnight Commander for Linux. It even includes viewer and editor.
I would like to call myself an author, but that's not so easy. The majority of the code, including this text itself, was initially written by ChatGPT 4. Newer features were automatically proposed and implemented by GPT-6 Astra.
ChatGPT doesn't generate code with an explicit license attached to it. The code it provides is intended for educational and informational purposes, and users are free to use it as they see fit. So, the license of Mini Commander is GNU GPL v3.
Tomas M slax.org
F3 or edit them with F4,
without launching an external program. Save in the editor with F2.F3, move to the other end, then press F3 again
to finish marking. F5 copies the block to the cursor and keeps the original
selected; F6 moves it and selects the moved block. F8 deletes the selection.
Blocks can span multiple lines; another F3 starts a new selection. Copying
or moving inside the selected block leaves the text unchanged.
Drag with the left mouse button to select a block without scrolling the view;
the cursor follows the drag, and releasing the button fixes the selection.
A plain click moves the cursor and clears the existing selection.F7 searches in the viewer and editor; Shift+F7 finds the next match.
Click a labeled button in this bar to invoke the same action as its function key..c,
.h) and shell scripts (.sh). Files starting with #!/ also receive shell
highlighting, even without an extension.<---> in the editor,
and trailing spaces appear as dots in the same color. F9 toggles HideTabs /
ShowTabs; when hidden, tabs appear as five spaces and trailing spaces as ordinary
spaces. Tabs always appear as five spaces in the viewer and remain single
characters for editing. The editor marks
control characters. Its status line shows the line, column, byte position,
file size, and Unicode code point under the cursor.Ctrl+U restores the previous edit, cursor movement, selection,
or viewport position. History is kept in memory without a fixed limit and is
released when the editor closes. Movement stores only a small state record;
edits retain the bytes they replace. Undoing a saved edit marks the file modified.Tab. Each panel has its own sorting
options (F2): name, size, or modification time, in either direction, with
directories first or mixed with files.Insert, then copy (F5),
move/rename (F6), or delete (F8). Copying and
deleting directories includes their contents.
With an empty command line, + selects a mask, - unselects a mask, and *
inverts the selection. The default mask * selects or clears all items except
.., including directories and dotfiles. Masks support only * and ?, where
? matches one displayed UTF-8 character. Matching is case-sensitive.F6 copies when a rename cannot cross a mount
boundary, preserves ownership, permissions and timestamps, and removes the
source only after the complete copy succeeds. Skipped, failed or aborted copies
leave the source intact. Symbolic links and FIFOs are preserved; hard-linked
files are copied independently.F7 accepts a path such as projects/demo/src
and creates missing parent directories too.Insert.
Right dragging marks or unmarks all crossed rows according to the first item,
keeping that choice for the whole drag. A drag stays in the panel where it began.
Dialog buttons such as OK, Cancel, Save, or the sorting choices accept left clicks;
clicking a text field focuses it and positions the cursor at the clicked character../mc -b or ./mc --nocolor to disable colors.| Shortcut | Action |
|---|---|
Alt+S, then type |
Jump to a filename by its prefix; press Alt+S again while searching for the next match. |
Ctrl+Space |
Calculate the size of the directory under the cursor, including its contents (with no other items selected). |
Alt+Enter |
Insert the filename under the cursor literally, followed by a space. |
Alt+A |
Insert the active panel's directory path literally, with a trailing slash so a filename can be appended. |
Alt+P / Alt+N |
Previous/next command in the in-memory history; returning past the newest entry restores the unfinished command. |
Ctrl+U |
Swap the panels, including paths, sorting, selections, cursors and scroll positions; focus follows the original active panel. In the editor, undo. |
Alt+G |
Go to a directory entered in a dialog; supports relative paths and ~. |
Shift+F5 / Shift+F6 / Shift+F7 |
Copy, move/rename, or create a directory with the name under the cursor prefilled, without its path. Typing appends to the name; relative targets use the active directory. |
Enter |
Execute a typed shell command in the active directory; with an empty command line, open a directory or run an executable. |
Ctrl+O |
Temporarily reveal terminal output; press any key to return to the panels. |
Ctrl+R or F9 |
Refresh both panels. |
Ctrl+L |
Redraw the screen. |
Press Alt+A, then Alt+Enter to insert the full path of the file under the
cursor. These shortcuts do not add quotes or escapes; add them manually when needed.
The command line handles a simple cd itself: cd, cd ~, cd .., and quoted
or escaped paths change the active panel. Compound shell commands such as
cd /tmp && ls execute in a child shell. Start with ./mc /source /destination
to open independent initial paths; a single path initializes the left panel.
Usage:
# Debian/Ubuntu build dependencies:
sudo apt-get install build-essential libncursesw5-dev
make
./mc
# Result of compilation is standalone 'mc' binary, it does not need anything else.
# There is no make install because 'mc' would interfere with midnight commander.
# So install it manually, for example copy ./mc to your path if you like
Use a UTF-8 terminal and locale to display international file and directory names
correctly, for example LC_ALL=C.UTF-8 ./mc. Both builds use Unicode-capable
ncurses (ncursesw), and panel labels are shortened without splitting UTF-8
characters. The viewer, editor, dialog text fields, command line, and panel
prefix search support UTF-8, including wide characters and combining accents.
Command-line navigation and deletion operate on complete display characters,
and horizontal scrolling uses terminal columns. Editor search ignores letter case using
the active locale. Files keep their original bytes unless edited; other text
encodings are not converted automatically. Complex joined emoji sequences are
not treated as a single character. Panel prefix search remains case-sensitive.
For a small, fully static 32-bit x86 binary built with musl and ncurses, run
sh static/build.sh. The script uses the source archives in static/sources,
downloads any missing dependencies, builds and packs static/mc, and saves
linking and size reports. Temporary build files are cleaned up afterwards.
See static build instructions.
Tento balíček zatím možná není v naší databázi zaindexován. Zkuste to prosím později, nebo zkontrolujte přímo repozitář balíčků.