Subject: bug#74524: 29.4; dirtrack-mode

From: Colton Goates <[email-masked]>
Date: Mon, 25 Nov 2024 10:27:00 -0700

Coltons-MacBook-Pro:/Users/coltongoates/software-dev/$ isn't intended to be
a directory name, it's a string that's intended to look exactly like my
prompt. (I know it's pretty contrived.)

So, if someone prints something that resembles their prompt, dirtrack will
change the directory, because dirtrack thinks it just saw the shell prompt
appear, but it really just saw a string that resembles the prompt. Does
that make more sense now?

On Mon, Nov 25, 2024 at 5:38 AM Eli Zaretskii <[email-masked]> wrote:

> > From: Colton Goates <[email-masked]>
> > Date: Sun, 24 Nov 2024 20:55:37 -0700
> >
> > In a shell, running a command like the following causes a problem with
> dirtrack-mode:
> >
> >     echo 'Coltons-MacBook-Pro:/Users/coltongoates/software-dev/$'
> >
> > After running this command, dirtrack thinks I changed to a different
> > directory based on the output, and it sets the default-directory
> > variable to the output of the echo command. Thus, the actual working
> > directory and shell directory are out of sync.
>
> Isn't that because the colon in this (unusual) directory name?  If so,
> you could perhaps customize the regexp in dirtrack-list to solve this?
>