[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening a `.HFS+ Private Directory Data'$'\r` folder messes up termi

From: Greg Wooledge
Subject: Re: Opening a `.HFS+ Private Directory Data'$'\r` folder messes up terminal prepended prompt
Date: Fri, 7 Feb 2020 09:06:08 -0500
User-agent: Mutt/1.10.1 (2018-07-13)

On Fri, Feb 07, 2020 at 05:11:43PM +1000, Magnon Damant wrote:
> I noticed a bug where when I open a Time Machine Backup folder (called .HFS+
> Private Directory Data'$'\r) the terminal cursor position gets messed up.

"Open" is a bit ambiguous here....

> prompt [<user>@<hostname>
> <folder>]$ gets messed up
> I guess the '$'\r name ending is causes the issue [maybe not escaped
> properly?].
> Prepended prompt should display [something like]:
> [magnon@magnon-desktop .HFS+ Private Directory Data^M]$

So, by "open", you mean "cd into".

wooledg:~$ mkdir $'crtest\r'
wooledg:~$ cd crtest^M/
$ oledg:~/crtest

Line 2 was generated by tab completion, not by typing caret-shift-M.

The carriage return in the directory name is simply being printed
literally to the terminal by the prompt.  It's not escaped, which
is why it looks like this.

I'm not sure I'd call this a bug -- more of a feature request, for
bash to present control characters in directory names (or partial
names), that are expanded from PS1, in an escaped form.

Meanwhile, I strongly advise you to rename this directory so that
it doesn't end with a carriage return.  This won't be the only
problem it causes you.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]