;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\306\307\310\311\312\302%\210\313\314\315\316\317DD\320\312\307\321\322&\207" [require cl-lib helm helm-lib helm-help helm-elisp custom-declare-group helm-eshell nil "Helm completion and history for Eshell." :group custom-declare-variable helm-eshell-fuzzy-match funcall function #[0 "\300\207" [nil] 1] "Enable fuzzy matching in `helm-esh-pcomplete' when non-nil." :type boolean] 8) #@35 Keymap for `helm-eshell-history'. (defvar helm-eshell-history-map (byte-code "\301 \302\"\210\303\304\305#\210\207" [helm-map make-sparse-keymap set-keymap-parent define-key [134217840] helm-next-line] 5) (#$ . 549)) #@34 Keymap for `helm-esh-pcomplete'. (defvar helm-esh-completion-map (byte-code "\301 \302\"\210\303\304\305#\210\207" [helm-map make-sparse-keymap set-keymap-parent define-key " " helm-next-line] 5) (#$ . 775)) (defvar helm-eshell--quit-flag nil) (defvar helm-ec-target "") #@130 Replace text at point with CANDIDATE. The function that call this should set `helm-ec-target' to thing at point. (fn CANDIDATE) (defalias 'helm-ec-insert #[257 "\304\301!\210`\n\203\305\n\306\307#\203`{\n\230\203`|\210\210\310\311\n\"\203*\312c\210\313 \307\314\315\316#\317!@\211\205N\320\306\307\310#)\266\203\211\205L\321\262\262\206T\316\261\210\207" [eshell-special-chars-outside-quoting comint-file-name-quote-list helm-ec-target inhibit-changing-match-data make-local-variable search-backward nil t string-match "\\`\\*" "*" helm-marked-candidates mapconcat #[257 "\301\302\"\203\303\304!!\305\306O\207\301\307\"\203\303!\207\301\310\"\205#\311\303\312!!P\207" [helm-ec-target string-match "\\`~/" comint-quote-filename abbreviate-file-name 1 nil "\\`/" "\\`[.]/" "./" file-relative-name] 5 "\n\n(fn X)"] " " last "/\\'" ""] 12 (#$ . 1056)]) #@27 (fn CANDIDATES SOURCES) (defalias 'helm-esh-transformer #[514 "\301\211:\2033@\262\211\302\303\"\203\304!\202(\302\305\"\203%\202(\306!C\244\262A\262\202\307\310\"\207" [helm-ec-target nil string-match "\\`~/?" abbreviate-file-name "\\`/" file-relative-name sort helm-generic-sort-fn] 9 (#$ . 1947)]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias helm-esh-source-p eieio-make-class-predicate helm-esh-source helm-esh-source--eieio-childp eieio-make-child-predicate helm-esh-source-child-p make-obsolete "use (cl-typep ... \\='helm-esh-source) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (helm-source-sync) ((init :initform (lambda nil (setq pcomplete-current-completions nil pcomplete-last-completion-raw nil) (remove-hook 'minibuffer-setup-hook 'eshell-mode))) (candidates :initform 'helm-esh-get-candidates) (persistent-action :initform 'ignore) (nohighlight :initform t) (filtered-candidate-transformer :initform #'helm-esh-transformer) (action :initform 'helm-ec-insert)) (:documentation "Helm class to define source for Eshell completion.")] 6) #@72 Create a new object of class type `helm-esh-source'. (fn &rest SLOTS) (defalias 'helm-esh-source #[128 "\300\301\302#\207" [apply make-instance helm-esh-source] 5 (#$ . 3167)]) (byte-code "\300\301\302\303#\300\207" [function-put helm-esh-source compiler-macro helm-esh-source--anon-cmacro] 4) #@26 (fn WHOLE &rest SLOTS) (defalias 'helm-esh-source--anon-cmacro #[385 "\211@;\204\207\300\301\302@@#@\303@DABB\"\207" [macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 7 (#$ . 3469)]) #@57 Get candidates for Eshell completion using `pcomplete'. (defalias 'helm-esh-get-candidates #[0 "\30622r\307!\203\206p\211q\210\310\211\310\211\310\211\311 \312 \313 \"\2066 \211;\205I\211\314\230?\205I\315\316!\"!\317 \"\211\310\211\211\211\320\310\211\204l\310\320\"\321\322 \"\210\262\310\211\262\203\360:\203\360@\262 \205\235\323!\203\210\202\235\316\324\325 !\203\227 \202\233\326!!\"\262 ;\205\270;\205\270\327!?\205\270\330\n\"\262\203\332\323!\204\314\331!\203\332\204\332C\244\262\202\345\204\345C\244\262A\262\310\262\202U\203) \203#\327\n!\203#\203#\332@!\204#\330\n \"\204#\333\nC\334 \"\"\266\212\202,\266\212\202,\211\266\212.\266\202)0\207" [helm-current-buffer pcomplete-stub pcomplete-seen pcomplete-norm-func pcomplete-args pcomplete-last pcompleted buffer-live-p nil pcomplete-completions try-completion pcomplete-entries "" file-name-as-directory expand-file-name all-completions t message "No completions of %s" file-remote-p file-name-directory directory-name-p directory-file-name file-directory-p file-equal-p file-exists-p executable-find append remove pcomplete-index pcomplete-autolist pcomplete-suffix-list helm-pattern default-directory helm-eshell--quit-flag] 18 (#$ . 3702)]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias helm-eshell-history-source-p eieio-make-class-predicate helm-eshell-history-source helm-eshell-history-source--eieio-childp eieio-make-child-predicate helm-eshell-history-source-child-p make-obsolete "use (cl-typep ... \\='helm-eshell-history-source) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (helm-source-sync) ((init :initform (lambda nil (remove-hook 'minibuffer-setup-hook 'eshell-mode))) (candidates :initform (lambda nil (with-helm-current-buffer (cl-loop for c from 0 to (ring-length eshell-history-ring) for elm = (eshell-get-history c) unless (and (member elm lst) eshell-hist-ignoredups) collect elm into lst finally return lst)))) (nomark :initform t) (multiline :initform t) (keymap :initform helm-eshell-history-map) (candidate-number-limit :initform 9999) (action :initform (lambda (candidate) (eshell-kill-input) (insert candidate)))) (:documentation "Helm class to define source for Eshell history.")] 6) #@83 Create a new object of class type `helm-eshell-history-source'. (fn &rest SLOTS) (defalias 'helm-eshell-history-source #[128 "\300\301\302#\207" [apply make-instance helm-eshell-history-source] 5 (#$ . 6142)]) (byte-code "\300\301\302\303#\300\207" [function-put helm-eshell-history-source compiler-macro helm-eshell-history-source--anon-cmacro] 4) #@26 (fn WHOLE &rest SLOTS) (defalias 'helm-eshell-history-source--anon-cmacro #[385 "\211@;\204\207\300\301\302@@#@\303@DABB\"\207" [macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity] 7 (#$ . 6499)]) #@31 (fn TARGET USERS-COMP LAST) (defalias 'helm-esh-pcomplete-input #[771 "\211;\203D\211\300\230\204D\204D\301!\204$\302!\211\205\303!\262\203D\303!\203@\304\305\"\203@\306\307\310!!\311\312!!P!\207\306!\207?\205J\211\207" ["" file-exists-p file-name-directory file-directory-p string-match "\\`[~.]*.*/[.]\\'" expand-file-name helm-basedir file-name-as-directory regexp-quote helm-basename] 8 (#$ . 6743)]) #@59 Make and return the default source for Eshell completion. (defalias 'helm-esh-pcomplete-default-source #[0 "\302\303\304\305\306 &\207" [helm-eshell-fuzzy-match helm-esh-completion-map helm-make-source "Eshell completions" helm-esh-source :fuzzy-match :keymap] 7 (#$ . 7178)]) #@53 Function that builds a source or a list of sources. (defvar helm-esh-pcomplete-build-source-fn 'helm-esh-pcomplete-default-source (#$ . 7463)) #@24 (fn &optional INPUT) (defalias 'helm-esh-pcomplete--make-helm #[256 "\301\302 \303\304\305\306\307&\207" [helm-esh-pcomplete-build-source-fn helm :sources :buffer "*helm pcomplete*" :resume noresume :input] 10 (#$ . 7612)]) #@60 Preconfigured `helm' to provide Helm completion in Eshell. (defalias 'helm-esh-pcomplete #[0 "\306\211\307 \212\310 \210`)\3112\312\"0\313\314`S\"\203!\314\202+\315\212\316\317!\210`)\"\211\320\230@\321\211\211\2068\314`\262 \203O\314\230\204OGZ\206V\314c\210\306\262`\262\322\323\"\203n\324\325!\210\306\262\n\326\nGSO\327=\203y\330 \202\256\331\332\333\334\3351\207\336 0\202\211\210\321!@#\262\337\340\341\"\210\342\216 \2039\343\344C\f\" \345=\203\250\346\202\251 \321\21167\347\3508\206\271\351\"\210\352\n\"\210\353\216\354\355#!\2065\211\203\334\306\356c\210\2065\203\356\313\357`S\"\203\356\324\325!\20659\204 ;\203 \360!\203 \313\361`S\"\203 \306\362c\210\20259\204\313\363`S\"\204\314c\2109\2055\364\321\306:\322#)\266\203\2055\362c-\202\255\365\216\354\355#!\206\254\211\203S\306\356c\210\206\254\203e\313\357`S\"\203e\324\325!\206\2549\204\204;\203\204\360!\203\204\313\361`S\"\203\204\306\362c\210\202\2549\204\224\313\363`S\"\204\224\314c\2109\205\254\364\321\306:\322#)\266\203\205\254\362c))*\207" [helm-quit-if-no-candidate helm-execute-action-at-once-if-one helm-ec-target helm-turn-on-show-completion helm-move-selection-after-hook helm-split-window-default-side t point-marker eshell-bol eshell-incomplete eshell-parse-arguments looking-back " " buffer-substring-no-properties eshell-backward-argument 1 "~" nil string-match "\\`[~.]*.*/[.]\\'" delete-char -1 0 40 helm-lisp-completion-or-file-name-at-point replace-regexp-in-string "\\`\\*" "" last (error) pcomplete-parse-arguments add-hook helm-quit-hook helm-eshell--quit-hook-fn #[0 "\205 \301!\205 \302!\207" [helm-show-completion-overlay overlayp delete-overlay] 2] append helm-show-completion same below helm-set-local-variable helm-display-function helm-default-display-buffer helm-show-completion-init-overlay #[0 "\301\302\303\"\210\304\211\207" [helm-eshell--quit-flag remove-hook helm-quit-hook helm-eshell--quit-hook-fn nil] 3] helm-esh-pcomplete--make-helm helm-esh-pcomplete-input "." "\\s-" file-directory-p "\\([.]\\{1,2\\}\\|[^/]\\)\\'" "/" "/\\'" "[.]\\{2\\}\\'" #[0 "\301\302\303\"\210\304\211\207" [helm-eshell--quit-flag remove-hook helm-quit-hook helm-eshell--quit-hook-fn nil] 3] helm-reuse-last-window-split-state helm-split-window-inside-p helm-show-completion-display-function helm-eshell--quit-flag inhibit-changing-match-data] 17 (#$ . 7848) nil]) (defalias 'helm-eshell--quit-hook-fn #[0 "\301\211\207" [helm-eshell--quit-flag t] 2]) #@40 Preconfigured Helm for Eshell history. (defalias 'helm-eshell-history #[0 "`\212\306 \210`)\211{\307C=\203\310c\210\211\311\240\210`\262\312\313\"\216\314\216\203a\315\316C \"\n\317=\2036\320\2027\n\307\211\321\322 \206D\323\"\210\324\"\210\325\326\327\330\331\332 $\333\334\335\336\337 &,\202s\325\326\327\330\331\332 $\333\334\335\336\337 &*\207" [helm-turn-on-show-completion helm-move-selection-after-hook helm-split-window-default-side helm-reuse-last-window-split-state helm-split-window-inside-p helm-show-completion-display-function eshell-bol nil " " t make-closure #[0 "\300\242\205\301\302`S\"\205\303\304!\207" [V0 looking-back " " delete-char -1] 3] #[0 "\205 \301!\205 \302!\207" [helm-show-completion-overlay overlayp delete-overlay] 2] append helm-show-completion same below helm-set-local-variable helm-display-function helm-default-display-buffer helm-show-completion-init-overlay helm :sources helm-make-source "Eshell history" helm-eshell-history-source :fuzzy-match :buffer "*helm eshell history*" :resume noresume :input helm-eshell-fuzzy-match] 13 (#$ . 10411) nil]) (byte-code "\301\302\303\304\305Y\205 \306\307\"BC\310\311\312%\210\301\313\303\304\305Y\205\314\315\"BC\316\311\312%\210\317\320\321\322\323DD\324\311\325\326\327&\207" [emacs-major-version custom-declare-face helm-eshell-prompts-promptidx t append 27 (:extend t) (:foreground "cyan") "Face used to highlight Eshell prompt index." :group helm-eshell-faces helm-eshell-prompts-buffer-name (:extend t) (:foreground "green") "Face used to highlight Eshell buffer name." custom-declare-variable helm-eshell-prompts-promptidx-p funcall function #[0 "\300\207" [t] 1] "Show prompt number." helm-eshell :type boolean] 8) #@38 Keymap for `helm-eshell-prompt-all'. (defvar helm-eshell-prompts-keymap (byte-code "\301 \302\"\210\303\304\305#\210\303\306\307#\210\207" [helm-map make-sparse-keymap set-keymap-parent define-key "o" helm-eshell-prompts-other-window "" helm-eshell-prompts-other-frame] 5) (#$ . 12162)) #@192 List the prompts in Eshell BUFFER. Return a list of ("prompt" (point) (buffer-name) prompt-index)) E.g. ("ls" 162 "*eshell*" 3). If BUFFER is nil, use current buffer. (fn &optional BUFFER) (defalias 'helm-eshell-prompts-list #[256 "r\211\206pq\210\303=\205U\212eb\210\304\305\306\211\203O\307 \304\306#\211\203H\n\203.\310\311\224\312\"\2042\n\204K\313\314 \"\315 FB\262T\262\210\202\304\262\210\202\210\237\266\202))\207" [major-mode eshell-prompt-regexp eshell-highlight-prompt eshell-mode nil 1 t re-search-forward get-text-property 0 read-only buffer-substring-no-properties point-at-eol buffer-name] 9 (#$ . 12463)]) #@73 List the prompts of all Eshell buffers. See `helm-eshell-prompts-list'. (defalias 'helm-eshell-prompts-list-all #[0 "\300 \301\211:\203@\262\302\303!!\244\262A\262\202\211\237\207" [buffer-list nil reverse helm-eshell-prompts-list] 6 (#$ . 13115)]) #@33 (fn CANDIDATES &optional ALL) (defalias 'helm-eshell-prompts-transformer #[513 "\301\211\211\211\211\211:\203`@\262\211A\262\242\262\211A\262\242\262\211A\262\242\262@\262\205:\302\303\304#\305P\205G\302\306!\303\307#\305PQFBB\262A\262\202\211\237\207" [helm-eshell-prompts-promptidx-p nil propertize face helm-eshell-prompts-buffer-name ":" number-to-string helm-eshell-prompts-promptidx] 14 (#$ . 13382)]) #@19 (fn CANDIDATES) (defalias 'helm-eshell-prompts-all-transformer #[257 "\300\301\"\207" [helm-eshell-prompts-transformer t] 4 (#$ . 13840)]) #@57 (fn CANDIDATE &optional (ACTION \='switch-to-buffer)) (defalias 'helm-eshell-prompts-goto #[385 "\211\203 \211A\262\242\202\300\203\301\302\303\304G\\D\"\210\3048\305 \230\203,\300=\2040!\210A@b\210\306 \207" [switch-to-buffer signal wrong-number-of-arguments helm-eshell-prompts-goto 2 buffer-name recenter] 8 (#$ . 13988)]) #@18 (fn CANDIDATE) (defalias 'helm-eshell-prompts-goto-other-window #[257 "\300\301\"\207" [helm-eshell-prompts-goto switch-to-buffer-other-window] 4 (#$ . 14339)]) #@18 (fn CANDIDATE) (defalias 'helm-eshell-prompts-goto-other-frame #[257 "\300\301\"\207" [helm-eshell-prompts-goto switch-to-buffer-other-frame] 4 (#$ . 14509)]) (defalias 'helm-eshell-prompts-other-window #[0 "\203\301\302!\207\303\304!\207" [helm-alive-p helm-exit-and-execute-action helm-eshell-prompts-goto-other-window error "Running helm command outside of context"] 2 nil nil]) (put 'helm-eshell-prompts-other-window 'helm-only t) (defalias 'helm-eshell-prompts-other-frame #[0 "\203\301\302!\207\303\304!\207" [helm-alive-p helm-exit-and-execute-action helm-eshell-prompts-goto-other-frame error "Running helm command outside of context"] 2 nil nil]) (put 'helm-eshell-prompts-other-frame 'helm-only t) #@68 Pre-configured `helm' to browse the prompts of the current Eshell. (defalias 'helm-eshell-prompts #[0 "\301=\203\302\303\304\305\306\307\310 \311\312\313\314&\315\316$\207\317\320!\207" [major-mode eshell-mode helm :sources helm-make-source "Eshell prompts" helm-source-sync :candidates helm-eshell-prompts-list :candidate-transformer helm-eshell-prompts-transformer :action (("Go to prompt" . helm-eshell-prompts-goto)) :buffer "*helm Eshell prompts*" message "Current buffer is not an Eshell buffer"] 11 (#$ . 15232) nil]) #@69 Pre-configured `helm' to browse the prompts of all Eshell sessions. (defalias 'helm-eshell-prompts-all #[0 "\301\302\303\304\305\306\307 \310\311\312\313\314&\n\315\316$\207" [helm-eshell-prompts-keymap helm :sources helm-make-source "All Eshell prompts" helm-source-sync :candidates helm-eshell-prompts-list-all :candidate-transformer helm-eshell-prompts-all-transformer :action (("Go to prompt" . helm-eshell-prompts-goto) ("Go to prompt in other window `C-c o`" . helm-eshell-prompts-goto-other-window) ("Go to prompt in other frame `C-c C-o`" . helm-eshell-prompts-goto-other-frame)) :keymap :buffer "*helm Eshell all prompts*"] 13 (#$ . 15767) nil]) (provide 'helm-eshell)