A simple, unconventional file browser designed for efficient file navigation and viewing.
browse is a minimalist file browser that focuses on essential features while maintaining a user-friendly interface. It's ideal for developers and system administrators who need a lightweight alternative to traditional file viewers.
- Forward and reverse paging
- Continuous scrolling (forward and reverse)
- Horizontal scrolling
- Line jumping
- Page marking
- Forward and reverse regex searches
- Case-sensitive/case-insensitive search toggle
- Pattern highlighting
- Shell escape with command completion
- Tail -f functionality
- Line numbers
- Session saving
- Help screen
-f, --follow | follow file changes |
-i, --ignore-case | search ignores case |
-n, --numbers | start with line numbers turned on |
-p, --pattern | initial search pattern |
-t, --title | page title, default is filename, blank for stdin |
-v, --version | print browse version number |
-?, --help | print browse command line options |
f [PAGE DOWN] [SPACE] |
Page down toward EOF |
b [PAGE UP] |
Page up toward SOF |
^F ^D z |
Scroll half page down toward EOF |
^B ^U Z |
Scroll half page up toward SOF |
+ [RIGHT] [ENTER] |
Scroll one line toward EOF |
- [LEFT] |
Scroll one line toward SOF |
d [DOWN] |
Toggle continuous scroll toward EOF, follow at EOF |
u [UP] |
Toggle continuous scroll toward SOF, stop at SOF |
> [TAB] |
Scroll 4 characters right |
< [BACKSPACE] [DEL] |
Scroll 4 characters left |
^ | Scroll to column 1 |
$ | Scroll to EOL |
0 [HOME] |
Jump to SOF, column 1 |
G | Jump to EOF |
e [END] |
Jump to EOF, follow at EOF |
t | Jump to EOF, tail at EOF |
/ | Regex search forward, empty pattern repeats search or changes search direction |
? | Regex search reverse, empty pattern repeats search or changes search direction |
n | Repeat search in the current search direction |
N | Repeat search in the opposite search direction |
i | Toggle between case-sensitive and case-insensitive searches |
p | Print the search pattern |
P | Clear the search pattern |
& | Run 'grep -nP' on the current file for search pattern |
# | Toggle line numbers on and off |
% ^G |
Page position |
! | Run a bash command (expands !, %, &, ~) |
B | Browse another file (expands %, ~) |
q | Quit, save .browserc, next file in list |
Q | Quit, don't save .browserc, next file in list |
x | Exit list, save .browserc |
X | Exit list, don't save .browserc |
! | Last bash command |
% | Current file name |
& | Current search pattern |
~ | Home directory |
browse saves sessions in ~/.browserc
with the following format:
- File name
- First line on page
- Search pattern
- Marks
- Page title
browse saves file history in ~/.browse_files
.
browse saves command history in ~/.browse_shell
.
- Xterm specific
- Logical lines are truncated to screen width
- May be US-centric
- Can be confused by non-printable characters
- Tabs are converted to spaces
- Terminal title changes due to go-prompt dependency
MIT License - see LICENSE file for details