anyframe-rs is a Rust implementation of anyframe, providing:
- Interactive filtering of various data sources (command history, directories, processes, etc.)
- Integration with popular filtering tools like peco, percol, fzf, and fzf-tmux
- Zsh widgets for common operations like executing commands from history, changing directories, and more
- Better performance and reliability through Rust implementation
First, you need to install one of the following filtering tools:
$ git clone https://github.com/x-smasato/anyframe-rs
$ cd anyframe-rs
$ cargo build --release
$ cp target/release/anyframe-rs ~/.local/bin/
Add the following to your .zshrc
:
# Load anyframe-rs plugin
source /path/to/anyframe-rs/anyframe.plugin.zsh
You can map anyframe-rs widgets to whatever key you like:
bindkey '^xr' anyframe-widget-execute-history
bindkey '^xd' anyframe-widget-cd-directory
# Add more keybindings as needed
anyframe-rs consists of four main components:
- Sources: Provide data to be filtered (history, directories, processes, etc.)
- Selectors: Interactive filtering tools (peco, percol, fzf, fzf-tmux)
- Actions: Perform operations on selected items (execute, insert, put)
- Widgets: Combine sources, selectors, and actions to create useful functionalities
# Specify which selector to use
zstyle ":anyframe:selector:" use peco
# or
zstyle ":anyframe:selector:" use fzf
# Specify path and options for selectors
zstyle ":anyframe:selector:peco:" command 'peco --no-ignore-case'
zstyle ":anyframe:selector:fzf:" command 'fzf --extended'
anyframe-widget-execute-history
anyframe-widget-cd-directory
anyframe-widget-checkout-git-branch
anyframe-widget-insert-git-branch
anyframe-widget-git-add
See CONTRIBUTING.md for details on how to contribute to anyframe-rs.
This project is licensed under the MIT License - see the LICENSE file for details.
This project uses pre-commit to run automatic checks before each commit.
To install pre-commit:
pip install pre-commit
pre-commit install
To run pre-commit manually:
pre-commit run --all-files