Newline in Filename

Andrew McNabb amcnabb at
Fri Sep 23 15:24:34 MDT 2011

On Fri, Sep 23, 2011 at 02:47:19PM -0600, Jessie Adan Morris wrote:
> I am trying to read some data from a Mac Time Machine Backup 
> which I have. The place where the data is stored is '/media/Time 
> Machine Backups/.HFS+ Private Directory Data^M'. That ^M is a 
> return character (\r). This really jacks up my terminal session and 
> makes it difficult to use.

In ZSH, I did the following:

amcnabb at sage:~/tmp :) echo -e "hello\r" |xargs mkdir
amcnabb at sage:~/tmp :) cd hello$'\r'
amcnabb at sage:~/tmp/hello^M :)

Are there particular problems that it was doing for your terminal
session?  With respect to the PROMPT, the ZSH behavior is perfect, in my
opinion, but you may be experiencing other problems that ZSH won't help
with.  In general, I have noticed that ZSH tends to deal with weird
cases like this better than Bash does.

Andrew McNabb
PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868

More information about the PLUG mailing list