ohmyzsh: termsupport.zsh breaks `ls` command result of FAT32 partition

This sounds a bit of weird, but setting window name of iTerm2 breaks ls command result.

Environment:

  • OS X 10.10.4
  • iTerm2 2.1.1
  • OMZ latest master branch
  • USB key with FAT32 partition

How to reproduce:

  1. Plug in the USB key that will be mounted automatically by OS X to, say /Volumes/USB
  2. Start iTerm2 (zsh as default shell and OMZ loaded, TERM is xterm-256color)
  3. cd /Volumes/USB and ls results only a . without any other files being listed, ls -l results ls: .: Invalid argument
  4. cd /Volumes and ls USB gives correct result, so does ls -l
  5. Comment out print -Pn "\e]2;$2:q\a" #set window name in termsupport.zsh, repeat above steps and problem is gone

Not sure how exactly this would happen, but feels like some escape problem.

The same issue has been reported here but didn’t get proper handling.

Solution

Here’s a workaround: https://github.com/robbyrussell/oh-my-zsh/issues/4161#issuecomment-153442082

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 52 (36 by maintainers)

Most upvoted comments

@apjanke I’ve actually already filed a bug report with Apple—and mentioned it to a friend of mine that works there, like that’s going to do anything 😛—but it’s such a corner case for practical use that I highly doubt they’ll look into it. Maybe if every single one of us submits a bug report for the same thing?

I don’t think their bug tracker is public, which explains why I can’t find a way to link to the bug report from here, but the bug report ID is 22557267