szermatt / emacs-bash-completion

Add programmable bash completion to Emacs shell-mode
GNU General Public License v2.0
279 stars 33 forks source link

bash-completion.el (bash-completion-quote): Add case for empty string #37

Closed abo-abo closed 5 years ago

abo-abo commented 5 years ago

I was just noticed I didn't PR this commit from some time ago. Here's how it changes the behavior:

;; Before:
(bash-completion-quote "")
;; => ""

;; After
(bash-completion-quote "")
;; => "''"

If I remember correctly, the intention is to fix the difference between bash completion and emacs-bash-completion.el. When TAB is issued with the last word being empty, bash completion passes that last empty string in the list, which emacs-bash-completion.el just has a shorter list with no empty string.

szermatt commented 5 years ago

Thank you!