rsnip
A powerful command-line snippet manager with fuzzy search capabilities, written in Rust.
Features
- 🔍 Fuzzy search with interactive selection
- 📋 Direct clipboard integration
- ⚡ Fast and memory efficient
- 🛠️ Shell completion support (bash)
- 📝 System editor integration ($EDITOR)
Installation
From Source
Configuration
rsnip looks for configuration in the following locations (in order of precedence):
~/.config/rsnip/config.toml
/etc/rsnip/config.toml
Example configuration:
[]
= "~/.config/rsnip/general_snippets.txt"
= "General text snippets"
[]
= "~/.config/rsnip/shell_snippets.txt"
= "Shell command snippets"
Usage
Basic Commands
# Show help
# List available snippet types
# Edit snippets (opens in your $EDITOR)
# Find completions interactively
# Copy a snippet to clipboard
# Show version and configuration info
Debug Levels
Use -d
flags to increase debug verbosity:
-d
: Info level-dd
: Debug level-ddd
: Trace level
Shell Completion
To enable shell completion for bash:
Snippet File Format
Snippets are stored in a simple text format:
This is the content of the snippet
It can span multiple lines
Single line content
Development
Prerequisites
- Rust 1.70 or higher
- Cargo
Building
Running Tests
Debug Logging
Set the RUST_LOG
environment variable for additional debug output:
RUST_LOG=debug
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the BSD 3 License - see the LICENSE file for details.