-
Notifications
You must be signed in to change notification settings - Fork 331
Below are some reasons why one might prefer using a terminal file manager. Note that, not all terminal file managers provide the same set of features and the emphasis here is given to lf.
-
Terminal file managers give you a visual representation of the current directory at all times. When you do some file operations (e.g. create/delete/rename a file/dir) you can immediately get a visual feedback. This releases the cognitive burden of keeping the representation of the filesystem on your mind and makes it easier to spot mistakes. A similar analogy for the relation between shells and terminal file managers can be seen in classical ex and vi editors. The idea of seeing the edited text continuously proved itself to be quite useful in many cases.
-
Terminal file managers let you assign frequent commands to simple keybindings. You can launch your pager/editor or run version control commands with a few keys. Unlike aliases/functions in regular shells, most of the time (i) you don't need an extra enter key, (ii) you don't need to type the file name or tab complete it, and (iii) you can get a popup list of existing mappings for keybindings with multiple keys without resorting to tab completion. This is similar to modal editing much like normal mode in vi, but for your shell.
-
Terminal file managers can be used to select certain files to operate with. Compared to globbing in regular shells, toggling files/dirs in terminal file managers (i) are usually more straightforward to do so, and (ii) minimizes the possibility of accidental selections by showing you what is selected. In any case, you can always use globbing in terminal file managers as well when you need it. Again, a similar analogy can be seen in the visual mode for vim editor which provides an alternative to operator pending mode when you need it.
-
Terminal file managers give you an alternative to cd/ls cycle or cd with tab completion. This lets you navigate the filesystem using the keys in your home row instead of typing names or tab completing them. Helper scripts are provided so that the present working directory of your shell can be automatically changed to the last directory you were on when you quit your terminal file manager. One might also set a keybinding in shell so that launching a terminal file manager is accomplished using a keybinding instead. As an alternative workflow, you can also launch a shell from inside the terminal file manager and then get back to your existing session when you quit the shell.
-
Terminal file managers can provide a preview of the currently selected file or directory. This is to give you an idea about the current file or directory without opening it. In addition, terminal file managers can be integrated to your editor to preview or open files besides other file operations. This way, you would be using the same file manager in your shell and editor.