A collection of functions to enhance commandline with FZF
First, clone this repository.
git clone https://github.com/liuyinz/fzf-collection.git
Then add the following line to your ~/.zshrc
.
source /path/to/fzf-collection.plugin.zsh
Clone this repository to custom plugin directory
git clone https://github.com/liuyinz/fzf-collection.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-collection
To start using it, add the fzf-collection plugin to your plugins array in ~/.zshrc
:
- plugins=(...)
+ plugins=(... fzf-collection)
brewf
:outdated
search
manage
tap
# dependency
brew install grep coreutils
pipf
:outdated
search
manage
npmf
:manage
outdated
search
registry
pnpmf
:manage
outdated
search
registry
proxyf
:switch
add
# dependency
brew install git-extras coreutils gh
gitf
:submodule
commit
ignoreio
stash
brew install gh jq
ghf
: manage user/repos
fp
: find$PATH
ffp
: find$FPATH
# dependency
brew install sqlite3 coreutils diffutils jq python-yq
bhf
: history searchbbf
: bookmark search
Supports:
Chrome | Edge | Firefox | Safari | |
---|---|---|---|---|
bhf |
Yes | Yes | Yes | Yes |
bbf |
Yes | Yes | Yes | No |
Setting FZF_COLLECTION_MODULES
to load modules. By default, all modules are loaded.
FZF_COLLECTION_MODULES=(
browser
brew
pip
proxy
git
gh
other
)
Setting FZF_COLLECTION_OPTS
to customize fzf options.
# set options if needed, default value is as below :
FZF_COLLECTION_OPTS="
--header-first
--ansi
--reverse
--cycle
--no-multi
--sort
--exact
--info=inline
--bind=change:first,btab:up+toggle,ctrl-n:down,ctrl-p:up
--bind=ctrl-u:cancel,ctrl-l:jump,ctrl-t:toggle-all,ctrl-v:clear-selection"
Setting BROWSERF_DEFAULT
to open URL, use default browser if not set.
# choose from "chorme" "edgemac" "firefox" "safari"
BROWSERF_DEFAULT="chrome"
Setting PROXYF_URLS
to provide URLs for switch:
# usually for https and socks, comma seperated.
PROXYF_URLS="http://127.0.0.1:1234,socks://127.0.0.1:1234"
- remove sed,tr,awk dependencies with perl
- fzf: proxy gem
- add proxy restore for initial proxy status
- sourcef: switch source for manager