I know that there are commands like cat
, less
or even xdg-open
, but I really like the convenience of just previewing. GNOME Sushi doesn't seem to support commands from the terminal.
Maybe a similar application can do the job or even writing a script? Is there a way to do this?
I think you might be interested in
ranger
. It is a terminal-based file manager that uses a three-columns layout. The left column shows the parent directory, with the current directory highlighted, the middle column shows the contents of the current directory and the right column shows a preview of the selected item.In the above screenshot you can see that I am inside the
/var/log
directory (left column) and I have selected thefaillog
file (middle column) which I am previewing (right column).You can install
ranger
by running:Start it by opening a terminal and running:
You can move around using the keyboard arrows or VIM-like shortcuts (h, j, k, l). You can open a file in the selected application by pressing Enter or →. You can close
ranger
by pressing q.More information can be found in the Official user guide.