fen is a terminal file manager inspired by ranger\ Works for Linux, macOS, FreeBSD and Windows
Download and run the latest version in the Releases page
Add it to your path environment variable, or (on Linux/FreeBSD) place the executable in /usr/local/bin
This requires Go 1.21.5 or above (install Go)
git clone https://github.com/kivattt/fen
cd fen
go build
./fen # fen.exe on Windows
Arrow keys, hjkl, mouse click or scrollwheel to navigate (Enter goes right), Escape key to cancel an action
? or F1 Toggle help menu\
F2 Show libraries used in fen\
q Quit fen\
z or Backspace Toggle hidden files\
Ctrl + Space or Ctrl + n Open file(s) with specific program\
! Run system shell command (cmd on Windows)\
Home or g Go to the top\
End or G Go to the bottom\
Ctrl + Left arrow Go to the root folder (or current Git repository if fen.git_status=true
)\
Ctrl + Right arrow Go to the path furthest down in history, follow a symlink or go to the first changed file if fen.git_status=true
\
M Go to the middle\
Page Up / Page Down Scroll up/down an entire page\
H Go to the top of the screen\
L Go to the bottom of the screen\
Del or x Delete file(s)\
y Copy file(s)\
d Cut file(s)\
p Paste file(s)\
/ or Ctrl + f Search\
c Goto path\
Space Select files\
A Flip selection in folder (select all files)\
D Deselect all, press again to un-yank\
a Rename a file\
b Bulk-rename (rename in editor)\
V Start selecting by moving\
n Create a new file\
N Create a new folder\
F5 Refreshes files, syncs the screen (fixes broken output), refreshes git status when fen.git_status=true
\
0-9 Go to a configured bookmark
You can find a complete default config with extra examples in the config.lua file\ For a full config folder example, see my personal config
Linux/FreeBSD: ~/.config/fen/config.lua
or $XDG_CONFIG_HOME/fen/config.lua
if $XDG_CONFIG_HOME
set\
macOS: $HOME/Library/Application Support/fen/config.lua
\
Windows: %AppData%\Roaming\fen\config.lua
You can specify a different config file with the --config
flag
Left-clicking to copy the selected path on Linux/FreeBSD requires xclip
to be installed
fen does not (yet!) have file previews by default\
For file previews with programs like cat
or head
, you can add something like this to your config.lua:
fen.preview = {
{
program = {"head -n 100"},
match = {"*"}
}
}
For something cross-platform, file previews can also be a lua script.
fen.preview = {
{
script = fen.config_path.."basic.lua",
match = {"*"}
}
}
If "script" is set, "program" will be ignored in the same preview entry.\ "script" can not be a list like "program" can, because we want to see syntax errors when writing lua code instead of falling back to anything.\ The "script" key has to be an absolute file path
You can change the current working directory to the one in fen on exit:
cd $(fen --print-folder-on-exit)
You can alias fen to do this every time you open it by adding this to your .bashrc
:
cd_fen() {
cd $(fen --print-folder-on-exit)
}
alias fen=cd_fen
NOTE: Using this alias will break command-line arguments, like fen -v
since the output will be passed to cd
.
18.446 EB free
), when in reality there is no available spacego test
doesn't work on WindowsSee TODO.md for other issues and possible future features, roughly sorted by priority