Skip to content

sweep.py is yet another command line fuzzy finder (fzf analog)

License

Notifications You must be signed in to change notification settings

aslpavel/sweep.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sweep.py

sweep.py is yet another command line fuzzy finder (fzf analog)

NOTE: that this project in maintanence mode, I've switched to rust based implementation sweep-rs which looks and works very simplarly to this one so check it out.

Features

  • single source file
  • no dependencies apart from python
  • true/256 color support
  • beautifull defaults
  • easy to specify custom theme colors

Installation

Just copy sweep.py to your PATH

Bash history lookup

Put this in your .bashrc file

__sweep_history__() (
  local line
  shopt -u nocaseglob nocasematch
  line=$(
    HISTTIMEFORMAT= history |
    sweep.py --reversed --nth=2.. --prompt='HISTORY' |
    command grep '^ *[0-9]') &&
    if [[ $- =~ H ]]; then
      sed 's/^ *\([0-9]*\)\** .*/!\1/' <<< "$line"
    else
      sed 's/^ *\([0-9]*\)\** *//' <<< "$line"
    fi
)

bind '"\C-r": " \C-e\C-u\C-y\ey\C-u`__sweep_history__`\e\C-e\er\e^"'

Demo

Dark/Light themes, 100000 words lookup: demo

About

sweep.py is yet another command line fuzzy finder (fzf analog)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages