Hacker News new | ask | show | jobs
by kwertyops 1243 days ago

  ~/me $_ x = files('Music')
  ~/me $_ for item in x:
        >     if 'Rick Astley' not in x['name']:
        >         delete(x['path'])
Shouldn’t that be:

  ~/me $_ x = files('Music')
  ~/me $_ for item in x:
        >     if 'Rick Astley' not in item['name']:
        >         delete(item['path'])

?
1 comments

on purpose to stop unwary copy pasting?
Haha, thanks! That's such an immensely charitable interpretation of my messy typo- I'll update the readme so people can copy paste there music collection into non-existence if they feel like it. (Luckily it'll just go to the recycle bin so those Bananarama mp3s are still recoverable)