Emacs: Eshell: Fix typos in Fish completion
parent
3b636be658
commit
c32466d8eb
|
@ -139,12 +139,12 @@ See `eshell-prompt-regexp'."
|
|||
(setq eshell-default-completion-function
|
||||
(lambda ()
|
||||
(while (pcomplete-here
|
||||
(let* ((raw-rompt (buffer-substring-no-properties (save-excursion (eshell-bol) (point)) (point)))
|
||||
(let* ((raw-prompt (buffer-substring-no-properties (save-excursion (eshell-bol) (point)) (point)))
|
||||
;; Keep spaces at the end with OMIT-NULLS=nil in `split-string'.
|
||||
(toks (split-string raw-prompt split-string-default-separators nil))
|
||||
;; We want the command (i.e. the first 'car') to be the
|
||||
;; command. Discard potential empty strings.
|
||||
(tokens (or (while (string= (car toks) "")
|
||||
(tokens (progn (while (string= (car toks) "")
|
||||
(setq toks (cdr toks)))
|
||||
toks))
|
||||
;; Fish does not support subcommand completion. We make
|
||||
|
@ -159,7 +159,7 @@ See `eshell-prompt-regexp'."
|
|||
(string-match "=" (car tokens))))
|
||||
;; Skip env/sudo parameters, like LC_ALL=C.
|
||||
(setq tokens (cdr tokens)))
|
||||
(mapconcat 'identity tokens " ")))
|
||||
(mapconcat 'identity tokens " "))))
|
||||
(mapcar (lambda (e) (car (split-string e "\t")))
|
||||
(split-string
|
||||
(with-output-to-string
|
||||
|
|
Loading…
Reference in New Issue