diff --git a/init.el b/init.el index 0ae4817..2e1640c 100644 --- a/init.el +++ b/init.el @@ -77,7 +77,9 @@ (("M-x" . helm-M-x) :map ctl-x-map ("C-f" . helm-find-files) - ("b" . helm-mini))) + ("b" . helm-mini) + :map helm-map + ("/" . gpolonkai/helm-ff-slash-dir-complete))) (use-package helm-swoop :ensure t @@ -1195,3 +1197,11 @@ (abbreviate-file-name (buffer-file-name)) "%b"))))) + +(defun gpolonkai/helm-ff-slash-dir-complete () + (interactive) + (if (and (equal "Find Files" (assoc-default 'name (helm-get-current-source))) + (stringp (helm-get-selection)) + (file-directory-p (helm-get-selection))) + (helm-execute-persistent-action) + (insert "/")))