I thought this was a weird bug until I discovered what was happening. % is used as a variable sigil. For example
echo %d %f
will print
/path/to thefile
if thefile is selected and we are in dir %d.
| Macro | What it Expands To |
|---|---|
%f |
The currently highlighted/selected file name |
%F |
The selected file in the unselected panel |
%d |
The path of the current working directory |
%D |
The path of the directory in the unselected panel |
%s |
All currently tagged/selected files |
%% |
A literal % symbol |
How to Bypass Macro Parsing
If you want to pass raw commands directly to your shell without MC expanding % macros:
- Hide the panels: Press
Ctrl+oto toggle off the MC panels and jump directly into your subshell. Typingecho %%here will output%%(or behave according to your shell's rules). PressCtrl+oagain to return to the MC layout. - Escape manually: Continue using
%%whenever you want a single%passed through the MC command prompt.