devd.conf by default considers many variables as internal, possibly expanding them to an empty string.
shell variables thus need to be wrapped into braces.
Details
- Reviewers
mail_fbsd2.e4m.org imp joerg
Eyeball review needed.
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Fine with me, but please check my comments.
sbin/devd/devd.conf.5 | ||
---|---|---|
700 | Should we write "Any text immediately following that..."? And can a var really start with a minus sign? If yes, and there are just no vars starting with '-' at the moment, please ignore this comment. |
sbin/devd/devd.conf.5 | ||
---|---|---|
700 | OK The asterisk and the minus sign form special variables. This is explained at the beginning of the "Variables" subsection. |
The asterisk and the minus sign form special variables.
That's what I thought as well. But what's mentioned in the manpage are asterisk and underscore ;-).
I correct myself: asterisk and underscore form special variables. However, minus signs are legal parts of any internal variable identifier, thus they are also allowed at the beginning of a name.
So in essence, $-foo, $_foo, and $*foo are all considered internal variables, undergoing normal variable replacement inside devd.
${mumble, $$$, $[ (to just name a few things) are all passed to the shell.