-
Notifications
You must be signed in to change notification settings - Fork 144
FAQ
Linwei edited this page Feb 19, 2019
·
35 revisions
fz is a bash/zsh plugin that seamlessly adds fuzzy search to tab completion of z.sh. z.lua
can work with it for better completion result, just define a _z
function and pass all the arguments to _zlua
before sourcing fz.sh:
function _z() { _zlua "$@"; }
source /path/to/fz.sh
If you are using zsh with antigen, initialize them like this:
antigen boundle skywind3000/z.lua
antigen boundle changyuheng/fz
function _z() { _zlua "$@"; }
Paste this script in your .bashrc
/ .zshrc
:
function j() {
if [[ "$argv[1]" == "-"* ]]; then
z "$@"
else
cd "$@" 2> /dev/null || z "$@"
fi
}
When you are using j xxx
it will first try cd xxx
and then z xxx
if cd failed.