Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Ultimatt
on Nov 25, 2021
|
parent
|
context
|
favorite
| on:
The fish shell is amazing
Is no one going to comment on for *.pdf assumes no spaces in filenames for the BASH example to be correct, what about Fish?
pxc
on Nov 25, 2021
|
next
[–]
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.
gnubison
on Nov 27, 2021
|
prev
|
next
[–]
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
moonchild
on Nov 25, 2021
|
prev
[–]
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: