Last active
September 5, 2018 00:02
-
-
Save bling/18655e86918bebd7bc3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar helm-fzf-source | |
(helm-build-async-source "fzf" | |
:candidates-process 'helm-fzf--do-candidate-process | |
:nohighlight t | |
:requires-pattern 2 | |
:candidate-number-limit 9999)) | |
(defun helm-fzf--do-candidate-process () | |
(let* ((cmd-args `("fzf" "-x" "-f" ,helm-pattern)) | |
(proc (apply #'start-file-process "helm-fzf" nil cmd-args))) | |
(prog1 proc | |
(set-process-sentinel | |
proc | |
(lambda (process event) | |
(helm-process-deferred-sentinel-hook | |
process event (helm-default-directory))))))) | |
(defun helm-fzf (directory) | |
(interactive "D") | |
(let ((default-directory directory)) | |
(helm :sources '(helm-fzf-source) | |
:buffer "*helm-fzf*"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Are you on an SSD? This works really quickly for me. I forked it to here for some better defaults for me. Thanks for the script!