Plugin catalog

file_tagger

Attaches tags to file paths and shows them in default and long listings.

↓ on this page

file_tagger attaches tags to file paths and shows them in listings. Reach for it when you want to mark files as work or important and find them again later with files-by-tag.

Turn it on

# ~/.config/lla/config.toml
enabled_plugins = ["file_tagger"]

Or run this once. It saves the same setting, so the plugin stays on until you run lla --disable-plugin file_tagger.

lla --enable-plugin file_tagger

Tags appear in the default and long views (formats = ["default", "long"]), and in the table view, which uses the long format. They come from one string field, tags.

lla --json | jq '.[] | select(.name=="README.md") | .plugin'
{
  "tags": "important, work"
}

Actions

Run an action with lla plugin run file_tagger <action> -- <args>. Every action is interactive, so it needs a TTY and the default --output human. Running one also enables the plugin and saves that setting.

ActionArgumentsWhat it does
add-tag<file> <tag>Adds a tag.
remove-tag<file> <tag>Removes a tag.
list-tags<file>Lists a file's tags.
all-tagsLists every tag in use.
files-by-tag<tag>Lists the files with a tag.
helpPrints usage.

Tags live in file_tags.txt, in ~/Library/Application Support/lla/ on macOS and ~/.config/lla/ on Linux. It holds one path and tag per line. The plugin doesn't check that the path exists.

Example

lla plugin run file_tagger add-tag -- ./README.md important
lla plugin run file_tagger add-tag -- ./README.md work
lla
┌──────────────────────────────────────┐
│ Added tag 'important' to ./README.md │
└──────────────────────────────────────┘
 
┌─────────────────────────────────┐
│ Added tag 'work' to ./README.md │
└─────────────────────────────────┘
 
.git/
README.md 
┌─
│ Tags         [important] [work]
└─
 
docs/
src/
lla plugin run file_tagger files-by-tag -- important
┌─
│ All Files for [important] ./README.md
└─

Settings

~/.config/lla/plugins/file_tagger/config.toml sets colors in a [colors] table: tag and tag_label.