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