File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -759,7 +759,7 @@ result. See `bash-completion-fix' for more details."
759759 (push (bash-completion-fix
760760 completion parsed-stub unparsed-stub open-quote completion-type nil )
761761 result))
762- (nreverse result))))
762+ (delete-dups ( nreverse result) ))))
763763
764764(defun bash-completion-fix
765765 (str parsed-prefix unparsed-prefix open-quote completion-type single)
Original file line number Diff line number Diff line change @@ -582,7 +582,15 @@ Return (const return-value new-buffer-content)"
582582 " hello world\n hello \n\n "
583583 (cl-letf (((symbol-function 'bash-completion-buffer )
584584 (lambda () (current-buffer ))))
585- (bash-completion-extract-candidates " hello" " hello" nil nil )))))))
585+ (bash-completion-extract-candidates " hello" " hello" nil nil )))))
586+ (should
587+ (equal
588+ '(" hello" " hellish" " hellow" )
589+ (bash-completion-test-with-buffer
590+ " hello\n hellish\n hello\n hellow\n "
591+ (cl-letf (((symbol-function 'bash-completion-buffer )
592+ (lambda () (current-buffer ))))
593+ (bash-completion-extract-candidates " hell" " hell" nil nil )))))))
586594
587595(ert-deftest bash-completion-nonsep-test ()
588596 (should (equal " ^ \t\n\r ;&|'\" #"
You can’t perform that action at this time.
0 commit comments