unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#59804: shell-resync-dirs hangs in (t)csh
@ 2022-12-03 11:37 Nicolas Graner
  2022-12-04  8:17 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Graner @ 2022-12-03 11:37 UTC (permalink / raw)
  To: 59804

In a shell buffer where the running shell is csh or tcsh, the command
shell-resync-dirs never returns.

You can test this even without changing your normal shell by typing
`csh' in any shell buffer, then M-<RET>
Emacs hangs until you quit with C-g.

The reason is that the `dirs' command in (t)csh (unlike its equivalent
in bash) adds a trailing space to its output. This triggers an infinite
loop.

As evidence that the trailing space is the culprit, note that this
kludge, whiche removes it, fixes the problem:

(setq shell-dirstack-query "dirs | sed 's/ $//'")

-- Nicolas





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-10 12:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-03 11:37 bug#59804: shell-resync-dirs hangs in (t)csh Nicolas Graner
2022-12-04  8:17 ` Eli Zaretskii
2022-12-04 18:41   ` Nicolas Graner
2022-12-04 19:15     ` Eli Zaretskii
2022-12-10 12:57       ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).