ZapMarks
November 1, 2024 ยท View on GitHub
Quick access to your most-used command-line bookmarks for Zsh
ZapMarks is a powerful Zsh plugin that streamlines your command-line workflow by providing instant access to frequently used commands through an intuitive bookmark system.
โจ Features
- ๐ Smart Search: Fuzzy search through your bookmarked commands
- ๐ Command Preview: See command details before execution
- โก๏ธ Quick Add: Bookmark new commands directly from the terminal
- ๐ Easy Management: Edit bookmarks with your preferred editor
- ๐ High Performance: Optimized performance using fzf and jq
๐ Quick Start
bash -c "$(curl -fsSL https://raw.githubusercontent.com/iliutaadrian/zapmarks/main/scripts/install.sh)"
After installation, restart your terminal or run:
source ~/.zshrc
๐ Prerequisites
Before installing, ensure you have:
๐ป Installation
Option 1: Automated Installation (Recommended)
The automated installation script will:
- Clone the repository to the appropriate location
- Configure your Zsh setup
- Install the default bookmarks file
Option 2: Manual Installation
-
Clone the repository:
git clone https://github.com/iliutaadrian/zapmarks.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zapmarks -
Run the installation script:
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zapmarks/scripts/install.sh -
Add the plugin to your
.zshrc:plugins=(... zapmarks)
๐ฏ Usage
Basic Commands
| Command | Description |
|---|---|
CTR+B | Open the bookmark fuzzy finder |
zapmarks-add | Add a new bookmark |
zapmarks-edit | Edit bookmarks file |
Example Workflow
-
Save a frequently used command:
zapmarks-add # Follow the prompts to add your command -
Press
Alt+Bto access your bookmarks -
Type to fuzzy search through your commands
-
Press Enter to execute the selected command
๐ Configuration
ZapMarks stores its configuration in ~/.zapmarks.json. The file structure is:
{
"bookmarks": [
{
"command": "git status",
"description": "Check git status",
"tags": ["git", "status"]
}
]
}