When using Midnight Commander and making my left panel a directory tree, I open a directory and it expands with Enter, but when I press Enter again nothing happens. This is a fresh install of mc
on Ubuntu 19.04. How do I collapse the directory tree in Midnight Commander's directory tree?
Asked
Active
Viewed 1,207 times
4

muru
- 72,889

Patoshi パトシ
- 1,775
1 Answers
2
Enter does two things in the directory tree: it loads the directory’s contents, and adds the subdirectories to the tree. There’s no direct opposite operation, but there are two ways to get back to the previous state:
- the first is to forget the directory, with F3; that also removes the parent directory from the tree (not the disk!), so you’ll need to go back to the parent and rescan with F2;
- the second is to navigate in dynamic mode, with F4; then you’ll only see the tree starting from the currently-selected directory, and pressing ↑ or ↓ will hide the previously-opened tree.

Stephen Kitt
- 434,908
-
this is useful, F3 to forget and reload parent – Dan D. Feb 08 '24 at 16:31