summaryrefslogtreecommitdiff
path: root/helm-files.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thievol@posteo.net>2020-10-12 08:35:21 +0200
committerThierry Volpiatto <thievol@posteo.net>2020-10-19 09:15:17 +0200
commitc11779cd11a1f62cd160ea9507641f8cc1a9d321 (patch)
treef60027e02ff17d9c1f4c2496b40ce7778fa60327 /helm-files.el
parentca820a29ed2a46543b3221444e7a3b6297a65c00 (diff)
Add support for fd shell command
Diffstat (limited to 'helm-files.el')
-rw-r--r--helm-files.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/helm-files.el b/helm-files.el
index 3033fb4a..787d3374 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -51,6 +51,7 @@
(declare-function helm-hg-find-files-in-project "ext:helm-ls-hg")
(declare-function helm-gid "helm-id-utils.el")
(declare-function helm-find-1 "helm-find")
+(declare-function helm-fd-1 "helm-fd")
(declare-function helm-get-default-program-for-file "helm-external")
(declare-function helm-open-file-externally "helm-external")
(declare-function helm-comp-read "helm-mode")
@@ -675,6 +676,7 @@ currently transfered in an help-echo in mode-line, if you use
(define-key map (kbd "C-c C-a") 'helm-ff-run-mail-attach-files)
(define-key map (kbd "C-c p") 'helm-ff-run-print-file)
(define-key map (kbd "C-c /") 'helm-ff-run-find-sh-command)
+ (define-key map (kbd "C-/") 'helm-ff-run-fd)
;; Next 2 have no effect if candidate is not an image file.
(define-key map (kbd "M-l") 'helm-ff-rotate-left-persistent)
(define-key map (kbd "M-r") 'helm-ff-rotate-right-persistent)
@@ -802,6 +804,7 @@ Don't set it directly, use instead `helm-ff-auto-update-initial-value'.")
"Complete at point `C-c i'" 'helm-insert-file-name-completion-at-point
"Insert as org link `C-c @'" 'helm-files-insert-as-org-link
"Find shell command `C-c /'" 'helm-ff-find-sh-command
+ "Fd shell command (C-/)" 'helm-ff-fd
"Add marked files to file-cache" 'helm-ff-cache-add-file
"Open file externally `C-c C-x, C-u to choose'" 'helm-open-file-externally
"Grep File(s) `C-s, C-u Recurse'" 'helm-find-files-grep
@@ -5569,6 +5572,18 @@ See `helm-browse-project'."
(helm-exit-and-execute-action 'helm-ff-find-sh-command)))
(put 'helm-ff-run-find-sh-command 'helm-only t)
+;; helm-hd bindings for hff
+(defun helm-ff-fd (_candidate)
+ "Run fd shell command from `helm-find-files'."
+ (require 'helm-fd)
+ (helm-fd-1 helm-ff-default-directory))
+
+(defun helm-ff-run-fd ()
+ "Run fd shell command action with key from `helm-find-files'."
+ (interactive)
+ (with-helm-alive-p
+ (helm-exit-and-execute-action 'helm-ff-fd)))
+(put 'helm-ff-run-fd 'helm-only t)
;;;###autoload
(defun helm-find-files (arg)