Guest User

Untitled

a guest
Nov 16th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #!/usr/bin/env fish
  2.  
  3. function fzf-files
  4. fzf \
  5. --header 'Enter to open in Sublime, ctrl-y to copy path' \
  6. --bind 'enter:execute-silent:subl {}' \
  7. --bind 'ctrl-y:execute-silent:echo {} | pbcopy' \
  8. --preview 'highlight -O xterm256 -s darkbone -l {} 2>/dev/null ||
  9. cat {}'
  10. end
  11.  
  12. function fzf-find
  13. if count $argv >/dev/null
  14. find $argv -type f | fzf-files
  15. else
  16. find . -type f | fzf-files
  17. end
  18. end
  19.  
  20. function fzf-rg
  21. rg -l $argv | fzf-files
  22. end
Add Comment
Please, Sign In to add comment