summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helm-config.el40
-rw-r--r--helm-eshell.el40
2 files changed, 40 insertions, 40 deletions
diff --git a/helm-config.el b/helm-config.el
index 31f1c4c2..d18af8bd 100644
--- a/helm-config.el
+++ b/helm-config.el
@@ -4224,46 +4224,6 @@ With a prefix arg reload cache."
:history 'helm-c-apt-input-history)))
;;;###autoload
-(defun helm-esh-pcomplete ()
- "Preconfigured helm to provide helm completion in eshell."
- (interactive)
- (let* ((helm-quit-if-no-candidate t)
- (helm-execute-action-at-once-if-one t)
- (target (thing-at-point 'symbol))
- (end (point))
- (beg (or (and target (- end (length target)))
- ;; Nothing at point.
- (progn (insert " ") (point)))))
- (setq helm-ec-target (or target " "))
- (with-helm-show-completion beg end
- (helm :sources 'helm-c-source-esh
- :buffer "*helm pcomplete*"
- :input (helm-ff-set-pattern ; Handle tramp filenames.
- (car (last (ignore-errors ; Needed in lisp symbols completion.
- (pcomplete-parse-arguments)))))))))
-
-;;;###autoload
-(defun helm-eshell-history ()
- "Preconfigured helm for eshell history."
- (interactive)
- (let* ((end (point))
- (beg (save-excursion (eshell-bol) (point)))
- (input (buffer-substring beg end))
- flag-empty)
- (when (eq beg end)
- (insert " ")
- (setq flag-empty t)
- (setq end (point)))
- (unwind-protect
- (with-helm-show-completion beg end
- (helm :sources 'helm-c-source-eshell-history
- :buffer "*Eshell history*"
- :input input))
- (when (and flag-empty
- (looking-back " "))
- (delete-char -1)))))
-
-;;;###autoload
(defun helm-c-run-external-command (program)
"Preconfigured `helm' to run External PROGRAM asyncronously from Emacs.
If program is already running exit with error.
diff --git a/helm-eshell.el b/helm-eshell.el
index bd38781f..9b362160 100644
--- a/helm-eshell.el
+++ b/helm-eshell.el
@@ -123,6 +123,46 @@ The function that call this should set `helm-ec-target' to thing at point."
(insert candidate))))
"Helm source for Eshell history.")
+;;;###autoload
+(defun helm-esh-pcomplete ()
+ "Preconfigured helm to provide helm completion in eshell."
+ (interactive)
+ (let* ((helm-quit-if-no-candidate t)
+ (helm-execute-action-at-once-if-one t)
+ (target (thing-at-point 'symbol))
+ (end (point))
+ (beg (or (and target (- end (length target)))
+ ;; Nothing at point.
+ (progn (insert " ") (point)))))
+ (setq helm-ec-target (or target " "))
+ (with-helm-show-completion beg end
+ (helm :sources 'helm-c-source-esh
+ :buffer "*helm pcomplete*"
+ :input (helm-ff-set-pattern ; Handle tramp filenames.
+ (car (last (ignore-errors ; Needed in lisp symbols completion.
+ (pcomplete-parse-arguments)))))))))
+
+;;;###autoload
+(defun helm-eshell-history ()
+ "Preconfigured helm for eshell history."
+ (interactive)
+ (let* ((end (point))
+ (beg (save-excursion (eshell-bol) (point)))
+ (input (buffer-substring beg end))
+ flag-empty)
+ (when (eq beg end)
+ (insert " ")
+ (setq flag-empty t)
+ (setq end (point)))
+ (unwind-protect
+ (with-helm-show-completion beg end
+ (helm :sources 'helm-c-source-eshell-history
+ :buffer "*Eshell history*"
+ :input input))
+ (when (and flag-empty
+ (looking-back " "))
+ (delete-char -1)))))
+
(provide 'helm-eshell)
;;; helm-eshell ends here