Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is no one going to comment on for *.pdf assumes no spaces in filenames for the BASH example to be correct, what about Fish?


Fish doesn't do automatic word splitting on variable substitutions like bash does. Like ZSH (afaik), Fish doesn't require you to religiously surround every variable substitution in double quotation marks in case the contents have a space.


Globs work correctly in Bash (not “BASH”), even with spaces in filenames. Yes, you need to quote most variable substitutions[0], but globs are fine.

[0]: except in the RHS of a variable assignment or after the ‘case’ keyword


I do not know about fish, but it behaves correctly in zsh.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: