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."
759
759
(push (bash-completion-fix
760
760
completion parsed-stub unparsed-stub open-quote completion-type nil )
761
761
result))
762
- (nreverse result))))
762
+ (delete-dups ( nreverse result) ))))
763
763
764
764
(defun bash-completion-fix
765
765
(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)"
582
582
" hello world\n hello \n\n "
583
583
(cl-letf (((symbol-function 'bash-completion-buffer )
584
584
(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 )))))))
586
594
587
595
(ert-deftest bash-completion-nonsep-test ()
588
596
(should (equal " ^ \t\n\r ;&|'\" #"
You can’t perform that action at this time.
0 commit comments