Skip to content

Blazingly fast and interactive file search scripts, based on FZF and BASH.

Notifications You must be signed in to change notification settings

Magnushhoie/bash_search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


bash_search

Blazingly fast and interactive file search scripts, based on FZF and BASH.
Sourced from https://github.com/junegunn/fzf/wiki/examples

Logo

Installation

Sets up notes directory and adds aliases to ~/.bash_profile or ~/.zshrc.

git clone https://github.com/Magnushhoie/bash_search
cd bash_search
bash setup.sh

Documentation

Commands are primarily sourced from https://github.com/junegunn/fzf/wiki/examples, with minor modifications.

$ f_help

FZF terminal shortcuts:
Control + R search bash history
Control + T search files
Escape + C jump to folder

function f_help ()    # Show list of commands
function f_open()     # Open the selected file. Hotkeys CTRL+O (open) or CTRL+E ($EDITOR)
function f_search ()  # Search all lines in all files, recursively
function f_file ()    # Find in file, preview contents
function f_folder ()  # Search folder names and cd
function f_view ()    # View files in folder, preview content and open in vim
function f_size ()    # Show cumulative file size for each file extension in folder, n-levels (default 4) deep
function f_hist ()    # Search BASH History: Fuzzy search bash history
function f_cd ()      # Interactive cd with fzf
function f_git_log () # Interactive git log (AWESOME)
function f_git_branch() # checkout git branch/tag, with a preview showing the commits between the tag/branch and HEAD
function f_kill ()    # Interactively kill process
function f_man ()     # Search bash manual
function f_pdf ()     # Search all PDFs in folder, recursively
function f_vim()      # Quick access files with fasd
function f_chrome()   # Search chrome bookmarks

Requirements

Automatically installed using brew in setup.sh

brew install coreutils fd bat ripgrep rga fasd vim the_silver_searcher

Compatibility

Compatible with zsh. Tested on MacOS Mojave and Ubuntu 21.04.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

Blazingly fast and interactive file search scripts, based on FZF and BASH.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages