diff options
author | katherine <shmibs@shmibbles.me> | 2016-10-03 03:54:11 -0700 |
---|---|---|
committer | katherine <shmibs@shmibbles.me> | 2016-10-03 03:54:11 -0700 |
commit | 85c7c435c4ab74d2839ce080e859bfc4b21250b8 (patch) | |
tree | fbdfc79bcd273af06270a444e1f4636e84081901 /.config/init/funcs/f | |
parent | b966fdeb00ccbe66e1e9f4d78e34aedad72bb9e0 (diff) | |
download | dotfiles-85c7c435c4ab74d2839ce080e859bfc4b21250b8.tar.gz |
move 'f' to init/funcs
Diffstat (limited to '.config/init/funcs/f')
-rwxr-xr-x | .config/init/funcs/f | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/init/funcs/f b/.config/init/funcs/f new file mode 100755 index 0000000..8ca8b94 --- /dev/null +++ b/.config/init/funcs/f @@ -0,0 +1,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 |