Show Navigation
Conversation
Notices
-
Does anyone know what `${1+"$@"}` in a generated #racket launcher does?
A few quick tests don't show me that it's any different from just "$@", and I don't see anything on a "+" in that position when I look in https://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameter-Expansion .
-
it is equivalent to "$@", except in old buggy shells that expanded "$@" to "" (a single zero-length argument) when no arguments were passed in. the 1+ part worked around that, discarding the erroneous empty argument if $1 was not defined