Skip to content

FZF widgets for zsh for accessing TMSU tagged files and dirs

License

Notifications You must be signed in to change notification settings

crater2150-zsh/tmsu-fzf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

FZF widgets for zsh for accessing TMSU tagged files and dirs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages