sunaku / dasht

💁 Search API docs offline, in terminal or browser
https://sunaku.github.io/dasht/man
827 stars 26 forks source link

Fix remove of stale files containing spaces #36

Closed frodeaa closed 5 years ago

frodeaa commented 5 years ago

replace xargs with while read, avoid globbing

the same could be achived by using xargs with -0 (GNU/BSD) if newline is replaced with \0

tr '\n' '\0' | xargs -0 sh -e -u -c '

but I think this solution is cleaner

fixes: https://github.com/sunaku/dasht/issues/35

sunaku commented 5 years ago

Beautiful patch! :ok_hand: Thank you. :+1: