Conversation

Notices

  1. Holy crap, zsh globbing is [i]powerful[/i]. :O !coderpony

    Wednesday, 15-Aug-12 19:14:25 UTC from web
    1. @bitshift Immensely.

      Wednesday, 15-Aug-12 20:01:06 UTC from web
      1. @toksyuryel Yeah. Before I'd just been happy that it has a saner approach than bash to whether nonescaped * is passed unglobbed to a program (i.e., it isn't, ever, even if there is actually a file called *). But I've been watching http://openclassroom.stanford.edu/MainFolder/VideoPage.php?course=PracticalUnix&video=zsh-globbing, and even just **/{whatever} is blowing my mind.

        Wednesday, 15-Aug-12 20:05:07 UTC from web
        1. @bitshift Prior to downloading the Bastion soundtrack, I made a directory with just symlinks to the game audio files that contained the music. However, I named the vocal tracks. `mplayer2 -loop 0 *` was playing them in alphabetical order, which was really throwing off the order because none of the files have leading zeros. I could have renamed the files to give them leading zeros, but instead I decided I'd try to get them to play in order via zsh globbing. This was complicated by the fact that I had named the vocal tracks, so none of my simple solutions worked. I ended up doing this: `mplayer2 -loop 0 ?.* [0-9][0-9]^[0-9]* [0-9][0-9][0-9]^[0-9]*` and it works perfectly.

          Wednesday, 15-Aug-12 20:10:44 UTC from web