Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env fish
- function fzf-files
- fzf \
- --header 'Enter to open in Sublime, ctrl-y to copy path' \
- --bind 'enter:execute-silent:subl {}' \
- --bind 'ctrl-y:execute-silent:echo {} | pbcopy' \
- --preview 'highlight -O xterm256 -s darkbone -l {} 2>/dev/null ||
- cat {}'
- end
- function fzf-find
- if count $argv >/dev/null
- find $argv -type f | fzf-files
- else
- find . -type f | fzf-files
- end
- end
- function fzf-rg
- rg -l $argv | fzf-files
- end
Add Comment
Please, Sign In to add comment