Skip to content

Latest commit

 

History

History
83 lines (54 loc) · 2.31 KB

README.md

File metadata and controls

83 lines (54 loc) · 2.31 KB

tmsu-fzf - ZLE widgets for TMSU using fzf

Overview | Installation | Requirements | Widgets | Configuration | License

license-badge

Overview

This zsh plugin adds widgets based on fzf-widgets for navigating files and directories based on TMSU tags.

This is a WIP and currently only provides cd'ing into tagged directories.

Requirements

Installation

You will need fzf-widgets loaded in your zsh to use this plugin.

If you use zplug, the following lines are required:

zplug 'ytet5uy4/fzf-widgets'

zplug 'crater2150/tmsu-fzf'

Having the TMSU virtual filesystem mounted enables the prompts to only show relevant tags for multi-tag-selection: if you select tag a, and there is another tag b in your database, it will only be available for selection, if there are files tagged with both. If you don't want this behaviour, you can disable it.

Widgets

To use the provided widgets, bind them to a key in your zshrc, e.g.

bindkey "^t" tmsu-fzf-change-directory

tmsu-fzf-change-directory

Prompts for tags until <done> is selected. Then all directories matching the tags are listed. Select one to change to it.

tmsu-fzf-insert-file

Prompts for tags until <done> is selected. Then all matching entries for the tags are listed. Select one to insert it at the current cursor position.

Configuration

You can configure the widgets via zstyle:

zstyle ':fzf:tmsu:tag' prompt-on-unique [on/off]

Setting this to on will open a prompt, even if the only choice left is <done>. By default this prompt will be skipped and just assume <done> as input.

zstyle ':fzf:tmsu:tag' disable-vfs [on/off]

Setting this to on will disable the use of a mounted tmsu filesystem to limit choice to relevant tags.

License

Copyright (c) 2020 crater2150

Released under the MIT License, see LICENSE.md.