Fix infloop in 'shell-resync-dirs' with tcsh

* lisp/shell.el (shell-resync-dirs): Remove trailing slash from
output of 'dirs', for csh/tcsh's sake.  (Bug#59804)
This commit is contained in:
Eli Zaretskii 2022-12-10 14:55:01 +02:00
parent 2f1269c333
commit 1753da24cd

View file

@ -1162,6 +1162,7 @@ line output and parses it to form the new directory stack."
(dlsl nil)
(pos 0)
(ds nil))
(setq dls (string-trim-right dls "[ ]+"))
;; Split the dirlist into whitespace and non-whitespace chunks.
;; dlsl will be a reversed list of tokens.
(while (string-match "\\(\\S-+\\|\\s-+\\)" dls pos)