zap-search
v1.1.0
Published
Fuzzy search files, folders, and zsh history from the terminal
Downloads
71
Maintainers
Readme
zap
zap is a small terminal helper for when you know "it is somewhere here" but do not want to manually dig for it.
It lets you:
- fuzzy search files and folders from the current directory
- jump into folders from the same prompt
- search your shell history and run old commands fast
- search ready-made terminal snippets for stuff like
docker, pick one, and send it back to your shell
Install
npm install -g zap-searchCurrent version: 1.1.0
Shell setup
Shell integration now supports:
zshbashfishpowershell
Use the setup for the shell you actually use.
zsh
zap init zsh >> ~/.zshrc
source ~/.zshrcbash
zap init bash >> ~/.bashrc
source ~/.bashrcfish
zap init fish >> ~/.config/fish/config.fish
source ~/.config/fish/config.fishPowerShell
zap init powershell >> $PROFILE
. $PROFILEThis wrapper is what allows zap to change your current directory and hand commands back to your shell cleanly.
Quick use
Search files or folders in the current project:
zap pacSearch command history:
zap %gitSearch command examples/snippets from the web:
zap web dockerThat last one is handy when you are stuck on some random command, like Docker flags you vaguely remember. Pick the one you want and zap sends it back to your shell so you can run it as-is or tweak it first.
What happens after selection
- file selected: opens the file
- folder selected: changes your current shell directory
- history command selected: executes the command
zap web <topic>selection: puts the chosen command into your shell line
Plain mode
If you do not want the interactive selector and just want the top match for files or folders:
zap pac --plainTypical examples
Open a file quickly:
zap readmeJump into a folder:
zap srcRun something from history:
zap %dockerLook up a command pattern when your brain is half-working:
zap web docker-compose
zap web tar
zap web findNotes
- hidden folders and common heavy folders like
node_modules,dist,build,.next,.turbo,out, andcoverageare skipped - history search checks your active shell and reads from
~/.zsh_history,~/.bash_history,~/.local/share/fish/fish_history, or PowerShell history accordingly - shell handoff features depend on running the shell setup above
Final Words
I'm Sujal Rana, and I'm making zap because when I was very new to programming and got exposed to the terminal, even basic things felt harder than they should.
At that time, even small terminal tasks used to feel irritating. Finding the right file, jumping into the right folder, remembering some old command, or searching for one Docker command I knew I had seen before, all of that was enough to break flow.
That feeling is the whole reason behind zap. I want something simple that makes terminal work feel less messy, especially when you're still learning and do not want to fight your tools for basic things.
If you use zap, build something around it, or just want to say hi, you can find me here:
And if you want to contribute, you're welcome !
If you have an idea, a fix, a weird edge case, or just want to improve the flow, open an issue or PR. This project is still being shaped, good contributions help make zap better for everyone using it.
