Llama — a terminal file manager.
Why another file manager? I wanted something simple and minimalistic.
Something to help me with faster navigation in the filesystem; a cd and ls
replacement. So I build "llama". It allows for quick navigation with fuzzy
searching. cd integration is quite simple. And you can open vim right from
the llama. That's it. As simple and dumb as a llama.
brew install llama
snap install llama
pkg_add llama
go install github.com/antonmedv/llama@latest
Or download prebuild binaries.
Put the next function into the .bashrc or a similar config:
| Bash | Fish |
|---|---|
function ll {
cd "$(llama "$@")"
} |
function ll
set loc (llama $argv); and cd $loc;
end |
| PowerShell | |
function ll() {
cd $(llama $args | Out-String -Stream | Select-Object -Last 1)
}See issues/30 for more details. |
|
Note: we need a such helper as the child process can't modify the working directory of the parent process.
| Key binding | Description |
|---|---|
Arrows, hjkl |
Move cursor |
Enter |
Enter directory |
Backspace |
Exit directory |
Space |
Toggle preview |
Esc |
Exit with cd |
Ctrl+C |
Exit without cd |
/ |
Fuzzy search |
dd |
Delete file or dir |
Preview mode:
Delete file or directory:
-
--icons: display iconsTo get the icons to render properly you should download and install a Nerd font from https://www.nerdfonts.com/.
Then, select that font as your font for the terminal.
The editor used for opening files from llama can be configured using the EDITOR or LLAMA_EDITOR environment variable.
| Bash | Fish | PowerShell |
|---|---|---|
export EDITOR=vim |
set -gx EDITOR vim |
$env:EDITOR = "vim" |
Key bindings may be configured via json. For example:
{
"bindings": [
{
"action": "keyQuit",
"keys": [ "q", "tab" ], // Bind keyQuit to activate with 'q' or 'tab' instead of `esc`
},
{
"action": "keyBack",
"keys": [ "shift+tab" ] // Use a key combination to navigate backwards
},
{
"action": "keyDelete",
"disabled": true // Disable the keyDelete action
}
]
}Note that the action property must match one of the following actions, and that the configurations provided to the action will fully override the default configuration for that action. All actions are enabled by default.
| Action | Default |
|---|---|
| keyForceQuit | ctrl+c |
| keyQuit | esc |
| keyOpen | enter |
| keyBack | backspace |
| keyUp | up |
| keyDown | down |
| keyLeft | left |
| keyRight | right |
| keyTop | shift+up pgup g |
| keyBottom | shift+down pgdown G |
| keyLeftmost | shift+left |
| keyRightmost | shift+right |
| keyHome | home |
| keyEnd | end |
| keyVimUp | k |
| keyVimDown | j |
| keyVimLeft | h |
| keyVimRight | l |
| keySearch | / |
| keyPreview | space |
| keyDelete | d |
| keyUndo | u |
| keyClearSearch | ctrl+w |
Some application behaviors may be configured via json. For example:
{
"editorDisabled": true, // Prevent attempts to open/edit files
"searchTimeoutDisabled": true // Prevent 2-second timeout of fuzzy search
}Various settings may be configured via json. By default, llama will search for a configuration file at ~\.config\llama\config.json where ~ is the user's home directory, but this may be overridden using the LLAMA_CONFIG environment variable.
The schema is presented below:
{
"editorDisabled": boolean, // default: false
"searchTimeoutDisabled": boolean, // default: false
"persistentSearchEnabled": boolean, // default: false
"instantSearchEnabled": boolean, // default: false
"bindings": [
{
"action": string,
"keys": string[],
"disabled": boolean, // default: false
"help": {
"key": string,
"desc": string
}
}
]
}

