• Stars
    star
    858
  • Rank 51,209 (Top 2 %)
  • Language
    Shell
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ef-๐ŸŸ-ient fish keybindings for fzf

Fzf

Integrate fzf (command-line fuzzy finder) functionality into Fish. Includes handy functions to:

  • complete commands via Tab
  • search command history
  • find and cd into sub-directories
  • find and open files

All functions:

  • are lazily-loaded to keep shell startup time down
  • have configurable key bindings

Installation

System Requirements

Install with Fisher:

fisher install jethrokuan/fzf

Quickstart

Legacy New Keybindings Remarks
Ctrl-t Ctrl-o Find a file.
Ctrl-r Ctrl-r Search through command history.
Alt-c Alt-c cd into sub-directories (recursively searched).
Alt-Shift-c Alt-Shift-c cd into sub-directories, including hidden ones.
Ctrl-o Alt-o Open a file/dir using default editor ($EDITOR)
Ctrl-g Alt-Shift-o Open a file/dir using xdg-open or open command

Legacy keybindings are kept by default, but these have conflict with key bindings in Fish 2.4.0. If you want to use the new keybindings, ฦ’enter the following into your terminal:

set -U FZF_LEGACY_KEYBINDINGS 0

You can disable default keybindings altogether by running:

set -U FZF_DISABLE_KEYBINDINGS 1

Note: On OS X, Alt+C (Option-C) types รง by default. In iTerm2, you can send the right escape sequence with Esc+C. If you configure the option key to act as +Esc (iTerm2 Preferences > Profiles > Default > Keys > Left option (โŒฅ) acts as: > +Esc), then Alt+C will work for fzf as documented.

Commands

Variable Remarks Example
FZF_FIND_FILE_COMMAND Modify the command used to generate the list of files set -U FZF_FIND_FILE_COMMAND "ag -l --hidden --ignore .git . \$dir 2> /dev/null" or set -U FZF_FIND_FILE_COMMAND "fd --type f . \$dir" ($dir represents the directory being completed)
FZF_CD_COMMAND Similar to ^ Similar to ^
FZF_CD_WITH_HIDDEN_COMMAND Similar to ^ Similar to ^
FZF_OPEN_COMMAND Similar to ^ Similar to ^
FZF_PREVIEW_FILE_CMD Modify the command used to generate preview of files. set -U FZF_PREVIEW_FILE_CMD "head -n 10"
FZF_PREVIEW_DIR_CMD Modify the command used to generate preview of directories. set -U FZF_PREVIEW_DIR_CMD "ls"

Variables

Variable Remarks Example
FZF_DEFAULT_OPTS Default options passed to every fzf command set -U FZF_DEFAULT_OPTS "--height 40"
FZF_FIND_FILE_OPTS Pass in additional arguments to the fzf command for find file set -U FZF_FIND_FILE_OPTS "--reverse --inline-info"
FZF_CD_OPTS Similar to ^ Similar to ^
FZF_CD_WITH_HIDDEN_OPTS Similar to ^ Similar to ^
FZF_REVERSE_ISEARCH_OPTS Similar to ^ Similar to ^
FZF_OPEN_OPTS Similar to ^ Similar to ^
FZF_COMPLETE_OPTS Similar to ^ Similar to ^
FZF_TMUX Runs a tmux-friendly version of fzf instead. set -U FZF_TMUX 1
FZF_ENABLE_OPEN_PREVIEW Enable preview window open command. set -U FZF_ENABLE_OPEN_PREVIEW 1

fzf Tab Completions

This package ships with a fzf widget for fancy tab completions.

Please see the wiki page for details.

Alternatives

  • fzf.fish is a newer fzf plugin with very similar features. It lacks fzf tab completion but includes functions for searching git log, git status, and browsing shell variables using fzf. Additionally, it is more likely to be maintained going forward. You can read more about the differences between it and this plugin on this fzf.fish Wiki page.
  • The fzf utility ships with its own out-of-the-box Fish integration. What sets this package apart is that it has better shell integration, most notably tab completions. They are not compatible so use one or the other.

License

MIT

More Repositories

1

z

Pure-fish z directory jumping
Shell
1,239
star
2

braindump

knowledge repository managed with org-mode and org-roam.
TeX
364
star
3

dots

tracking my dotfiles
Emacs Lisp
168
star
4

mathpix.el

Mathpix Emacs Plugin
Emacs Lisp
98
star
5

.emacs.d

Emacs Lisp
92
star
6

emacs-workshop

Emacs Course Prep Material
85
star
7

cortex

Hugo Theme for my Braindump
HTML
73
star
8

org-roam-guide

How I Take Notes In Org-roam (WIP)
CSS
30
star
9

srsly

Spaced-repetition using Hypothes.is
JavaScript
27
star
10

org-remembrance

Remembrance Agents for Org-mode, powered by Recoll
Emacs Lisp
18
star
11

git_porcelain

Git status info adapted from @michaeldfallen git-radar
Shell
16
star
12

nix-config

Nix
14
star
13

srs.ly

SRS with Hypothes.is
JavaScript
14
star
14

sharedb-ace

ShareDB bindings for Ace Editor
JavaScript
10
star
15

esnn

Evolving Spiking Neural Networks
Python
10
star
16

track

Rust
10
star
17

filenotify-recursive

Recursive watchers for Emacs
Emacs Lisp
9
star
18

dotfiles

Shell
9
star
19

org-ref-ox-hugo

org-ref overrides to play nice with ox-hugo
Emacs Lisp
8
star
20

jetty

Fish theme
Shell
8
star
21

koi

Scaffold projects
Shell
7
star
22

nix

NixOS configuration with Nix flakes
Nix
7
star
23

blog

My personal blog.
Emacs Lisp
6
star
24

telegram-rss

Telegram bot for RSS feeds
Python
5
star
25

elementary

Elementary Theme for Hugo
HTML
4
star
26

ranking_algorithms

Ranking via binary comparisons
Python
4
star
27

ol

Openlectures 2.0
JavaScript
4
star
28

fish-yourls

CLI for YOURLS
Shell
4
star
29

.emacs.d-android

Emacs config for termux
Emacs Lisp
4
star
30

catkin_ros

Python
4
star
31

jita

Python
3
star
32

guild.el

Emacs Interface to guild.ai
Emacs Lisp
3
star
33

ugapi

Ultimate-guitar API
Python
3
star
34

lda2vec

Python
3
star
35

fish-direnv

Shell
3
star
36

fish-imagemagick

handy shortcuts for imagemagick
Shell
3
star
37

fzf_ocaml

FZF clone in OCaml
OCaml
2
star
38

lda-survey

TeX
2
star
39

gtd-mode

Emacs minor-mode for GTD
Emacs Lisp
2
star
40

aoc2021

Advent of Code 2021 in Rust
Rust
2
star
41

physics-notes

Physics notes I made in 2011, now open-sourced
TeX
2
star
42

mkdocstr

Use tree-sitter to generate docstrings!
Python
2
star
43

gitalias

Shell
2
star
44

fish-nix

Fish nix helper functions
Shell
2
star
45

FYP-Report

TeX
2
star
46

jethrokuan

itz me
2
star
47

jethro.dev

Source for https://jethro.dev
HTML
1
star
48

fish-hugo

Shell
1
star
49

talks

Collection of Talks in org mode
HTML
1
star
50

fish-emacs

Emacs daemon shortcuts
Shell
1
star
51

books

HTML
1
star
52

advent-2018

Advent of Code 2018 in OCaml
OCaml
1
star
53

snnrl

Python
1
star
54

gcloud.el

Emacs interface to GCP
Emacs Lisp
1
star
55

org-capture-bot

Nix
1
star
56

metronome

JavaScript
1
star
57

smpl-hugo

Simple Theme for Hugo
CSS
1
star
58

econsguide

Econs 'A' Level Comprehensive Guide
Ruby
1
star
59

edubot

CSS
1
star
60

frogger_ocaml

Ocaml implementation of Frogger
OCaml
1
star
61

data-science-notebooks

Jupyter Notebook
1
star
62

git_distance

Calculates distance from remote
Shell
1
star
63

SPA-T14

C++
1
star
64

electron-cljs

Clojure
1
star
65

submit

Submit a plugin to the index
Shell
1
star
66

hugo-tufte

A fork of https://github.com/shawnohare/hugo-tufte
CSS
1
star
67

tree

Shell
1
star
68

ol-design

OL's new design, made with bourbon and neat
CSS
1
star