This repository has been archived on 2022-08-21. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/home/.config/nnn/plugins/fzz

20 lines
339 B
Bash
Executable File

#!/usr/bin/env sh
# Description: cd to any dir in the z database using an fzf pane
. "$(dirname "$0")"/.nnn-plugin-helper
if type fzf >/dev/null 2>&1; then
fuzzy="fzf --no-multi"
else
exit 1
fi
if command -v zoxide >/dev/null; then
sel=$(zoxide query --list | $fuzzy)
else
exit 1
fi
printf "%s" "0c$sel" > "$NNN_PIPE"