Giter Site home page Giter Site logo

fzf-extras's Introduction

fzf-extras

Additional key bindings for fzf, primarily Bash.

Usage

Bash

directory

bash cmdline description
zd 'fuzzy-finder' + 'cd' = 'zd', the super function of _fd, _fda, _fdr, _fst, _cdf, _zz
_cdf cd into the directory of the selected file
_fd cd into selected directory
_fda cd into selected directory, including hidden directories
_fdr cd into selected parent directory
_fst cd into the directory from stack
_zz Selectable cd to 'frecency' directory

file

bash cmdline description
e Open 'frecency' files with $VISUAL editor
fe [FUZZY PATTERN] Open selected file with $EDITOR
fo Equivalent to fe, but opens file with $OPENER (default: xdg-open) if you press Ctrl+O
v Open selected files from ~/.viminfo with $EDITOR

git

bash cmdline description
fbr Checkout Git branch (including remote branches)
fco Checkout Git branch/tag
fcoc Checkout Git commit
fcs Get Git commit SHA hash
fshow Git commit browser
fstash Git stash management (Enter to show contents of the stash, Ctrl+D to show a diff of the stash against your current HEAD, Ctrl+B to check the stash out as a branch, for easier merging)
fzf-gitlog-multi-widget Multi-selectable git show
fzf-gitlog-widget Git log browser

history

bash cmdline description
fh Select line from history, repeat without editing
fhe Select line from history, leave for editing
runcmd Utility function used to run the command in the shell
writecmd Utility function used to write the command in the shell

pid

bash cmdline description
fkill Select process to kill (alternatively, type kill˽Tab)

tags

bash cmdline description
ftags Search ctags

tmux

bash cmdline description
fs [FUZZY PATTERN] Select tmux session
ftpane Switch pane

Zsh

file

zsh cmdline description
Alt-i Paste the selected entry from locate output into the command line

Installation

Install fzf-extras

Arch Linux

Install aur/fzf-extras.

Manual

git clone https://github.com/atweiden/fzf-extras ~/.fzf-extras

Configure fzf-extras

To make use of function fo, consider setting the $OPENER environment variable. If $OPENER is unset, fo will attempt to open files with xdg-open when pressing Ctrl+O.

Arch Linux

cat >> ~/.bashrc <<'EOF'
OPENER=mimeo
EOF

MacOS

cat >> ~/.bashrc <<'EOF'
OPENER=open
EOF

Source fzf-extras

Arch Linux

# bash users only
cat >> ~/.bashrc <<'EOF'
[[ -e "/usr/share/fzf/fzf-extras.bash" ]] \
  && source /usr/share/fzf/fzf-extras.bash
EOF

# zsh users only
cat >> ~/.zshrc <<'EOF'
[[ -e "/usr/share/fzf/fzf-extras.zsh" ]] \
  && source /usr/share/fzf/fzf-extras.zsh
EOF

Manual

# bash users only
cat >> ~/.bashrc <<'EOF'
[[ -e "$HOME/.fzf-extras/fzf-extras.sh" ]] \
  && source "$HOME/.fzf-extras/fzf-extras.sh"
EOF

# zsh users only
cat >> ~/.zshrc <<'EOF'
[[ -e "$HOME/.fzf-extras/fzf-extras.zsh" ]] \
  && source "$HOME/.fzf-extras/fzf-extras.zsh"
EOF

Zsh users should not be sourcing fzf-extras.sh.

The lack of meaningful support for Zsh will be fixed pending suitable PRs from Zsh-using contributors. Note it is perfectly acceptable to duplicate code from fzf-extras.sh into fzf-extras.zsh. See: atweiden#12.

Dependencies

Required

Optional

Sources

See Also

License

MIT

fzf-extras's People

Contributors

97-109-107 avatar danielfgray avatar f0086 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.