All Projects → aperezdc → Zsh Fzy

aperezdc / Zsh Fzy

Licence: mit
Use the fzy fuzzy-finder in Zsh

Programming Languages

shell
77523 projects

Labels

Projects that are alternatives of or similar to Zsh Fzy

Calc.plugin.zsh
zsh calculator - with support for basic math
Stars: ✭ 105 (+118.75%)
Mutual labels:  zsh, plugin
Z.lua
⚡ A new cd command that helps you navigate faster by learning your habits.
Stars: ✭ 2,164 (+4408.33%)
Mutual labels:  zsh, plugin
Autoenv
Autoenv for zsh
Stars: ✭ 131 (+172.92%)
Mutual labels:  zsh, plugin
Thirsty
Reminds you to drink water - on your terminal.
Stars: ✭ 296 (+516.67%)
Mutual labels:  zsh, plugin
Sheldon
A fast, configurable, shell plugin manager
Stars: ✭ 144 (+200%)
Mutual labels:  zsh, plugin
Zsh Lazyload
zsh plugin for lazy load commands and speed up start up time of zsh
Stars: ✭ 33 (-31.25%)
Mutual labels:  zsh, plugin
Elasticsearch Ukrainian Lemmatizer
Ukrainian lemmatizer plugin for ElasticSearch
Stars: ✭ 44 (-8.33%)
Mutual labels:  plugin
Pytest Mimesis
Mimesis integration with the pytest test runner. This plugin provider useful fixtures based on providers from Mimesis.
Stars: ✭ 46 (-4.17%)
Mutual labels:  plugin
Sublimall Server
Server behind Sublimall SublimeText plugin
Stars: ✭ 43 (-10.42%)
Mutual labels:  plugin
Pretty Git Prompt
`git status` inside your shell prompt
Stars: ✭ 43 (-10.42%)
Mutual labels:  zsh
Documentation
Online documentation and tracking tools for Naninovel — writer-friendly visual novel engine
Stars: ✭ 48 (+0%)
Mutual labels:  plugin
Mybatis Generator Plugin
Mybatis Generator 代码生成插件拓展,增加:查询单条数据插件(SelectOneByExamplePlugin)、MySQL分页插件(LimitPlugin)、数据Model链式构建插件(ModelBuilderPlugin)、Example Criteria 增强插件(ExampleEnhancedPlugin)、Example 目标包修改插件(ExampleTargetPlugin)、批量插入插件(BatchInsertPlugin)、逻辑删除插件(LogicalDeletePlugin)、数据Model属性对应Column获取插件(ModelColumnPlugin)、存在即更新(UpsertPlugin)、Selective选择插入更新增强插件(SelectiveEnhancedPlugin)、Table增加前缀插件(TableSuffixPlugin)、自定义注释插件(CommentPlugin)、增量插件(IncrementsPlugin)、查询结果选择性返回插件(SelectSelectivePlugin)、乐观锁插件(OptimisticLockerPlugin)、LombokPlugin等拓展。
Stars: ✭ 1,038 (+2062.5%)
Mutual labels:  plugin
Grails Audit Logging Plugin
The Grails Audit Logging Plugin
Stars: ✭ 45 (-6.25%)
Mutual labels:  plugin
Dotenv Webpack
A secure webpack plugin that supports dotenv and other environment variables and only exposes what you choose and use.
Stars: ✭ 1,022 (+2029.17%)
Mutual labels:  plugin
Dotfiles
dotfiles for my macOS & Linux environments ⌨️
Stars: ✭ 46 (-4.17%)
Mutual labels:  zsh
Baseplug
MVC audio plugin framework for rust
Stars: ✭ 44 (-8.33%)
Mutual labels:  plugin
Steambridge
A UE4 implementation of the Steamworks API.
Stars: ✭ 48 (+0%)
Mutual labels:  plugin
Yoast Seo For Typo3
Yoast SEO plugin for TYPO3
Stars: ✭ 43 (-10.42%)
Mutual labels:  plugin
Gitstatus
Git status for Bash and Zsh prompt
Stars: ✭ 1,024 (+2033.33%)
Mutual labels:  zsh
Scxcodeminimap
Sublime Text like Minimap for Xcode
Stars: ✭ 1,037 (+2060.42%)
Mutual labels:  plugin

zsh-fzy

zsh-fzy is a zsh plugin that uses fzy for certain fuzzy matching operations. The plugin defines the following Zle widgets:

  • fzy-file-widget: Starts recursive file selection, and inserts the chosen file paths in the command line.

  • fzy-cd-widget: Starts subdirectory selection, and changes to the chosen directory with cd.

  • fzy-history-widget: Starts command history selection, using the existing input (if any) as initial search query, and replaces the command line with the chosen one.

  • fzy-proc-widget: Starts processes selection, and inserts the chosen process ID in the command line.

Installation

It can be installed manually, or by using a plugin manager, e.g. zplug:

zplug aperezdc/zsh-fzy

Configuration

By default the widgets defined by the plugin are not bound. A typical configuration could be:

# ALT-C: cd into the selected directory
# CTRL-T: Place the selected file path in the command line
# CTRL-R: Place the selected command from history in the command line
# CTRL-P: Place the selected process ID in the command line
bindkey '\ec' fzy-cd-widget
bindkey '^T'  fzy-file-widget
bindkey '^R'  fzy-history-widget
bindkey '^P'  fzy-proc-widget

Additional configuration is done using Zsh styles. The following lists the available styles and their defaults:

zstyle :fzy:tmux    enabled      no

zstyle :fzy:history show-scores  no
zstyle :fzy:history lines        ''
zstyle :fzy:history prompt       'history >> '
zstyle :fzy:history command      fzy-history-default-command

zstyle :fzy:file    show-scores  no
zstyle :fzy:file    lines        ''
zstyle :fzy:file    prompt       'file >> '
zstyle :fzy:file    command      fzy-file-default-command

zstyle :fzy:cd      show-scores  no
zstyle :fzy:cd      lines        ''
zstyle :fzy:cd      prompt       'cd >> '
zstyle :fzy:cd      command      fzy-cd-default-command

zstyle :fzy:proc    show-scores  no
zstyle :fzy:proc    lines        ''
zstyle :fzy:proc    prompt       'proc >> '
zstyle :fzy:proc    command      fzy-proc-default-command

Setting :fzy:tmux enabled will use a split pane when the shell is running inside Tmux. Currently there are no options to allow configuration of the Tmux pane used for the widgets. Contributions to address this are very welcome, as well as day-to-day testing with this option enabled.

For each widget, the :fzy:${widget} context contains the following options:

  • show-scores: Whether to let fzy show the matching scores for each entry.
  • lines: The number of lines of the screen to use for the list of candidate matches. If undefined, fzy's default is used. A value can be prefixes with min:, which will cause fzy to use at least a certain amount of lines, plus any additional lines which may be available below until the last row of the terminal (note that this needs an ECMA-48-capable terminal (most are).
  • prompt: The prompt shown before the user input.
  • command: The command executed to generate the list of candidates for selection.

Commands

Commands used to generate lists of candidate entries for completoin must write items to standard output, one per line. Commands fzy-file-default-command, fzy-cd-default-command, and fzy-history-default-command are used by default. The first two use find(1) under the hood, and you may prefer to use other tools like RipGrep to produce the list of candidate elements shown by the widgets:

zstyle :fzy:file command rg --files

Note that the command settings are arrays, please take it into account when specifying them:

zstyle :fzy:file command rg --files    # Correct. Array of two elements.
zstyle :fzy:file command 'rg --files'  # Incorrect. Array of one element.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].