aboutsummaryrefslogtreecommitdiffstats
path: root/.config/init/funcs/f
blob: 8ca8b9402ccd922bd981b5bab8597b229e51a946 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env zsh
# fuzzy find with fzf

local file
fzf --color=16 --black \
	--bind=ctrl-b:page-up,ctrl-f:page-down \
	| read file

[[ -z "$file" ]] && return

[[ $(xclip -o 2>/dev/null) ]] || { echo "${file:a}"; return }

echo "${file:a}" | xclip -i -selection clipboard