Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: how to either ignore or deal with Icon$'\r' files on macOS



I'll add to Bart's reply that you can print strings with unprintable
characters like this:

    print -r -- ${(q)i}

The printed string round-trips, meaning that you can copy it into your
code for the purpose of comparison via == and the like. For the icon
files you'd get Icon$'\r'.

For strings with many unprintable characters it may be more convenient
to use ${(qqqq)i}. It puts the whole string inside a single $'...', as
in $'Icon\r'.

Roman.



Messages sorted by: Reverse Date, Date, Thread, Author