Closed borkovic closed 1 year ago
Does a if not
statement have to follow an if
statement immediately?
Found at this man page:
if not
command The immediately preceding command must have beenif(list)
command. If its condition was non-zero, the command is executed.
Hi Drazen, I'm afraid the if not
syntax was retrofitted late in rc's life by a maintainer who is no longer associated with the project. When I have the time to clean up the loose ends I would prefer to remove this syntax entirely; as far as I am concerned it was added experimentally. At the moment I have little spare time to devote to rc maintenance.
I've removed the if not
syntax, so this is no longer an issue.
if not
behaves differently when vacuousif (false)
is added.Current master commit:
Without
if (false)
:With
if (false)
"I discovered it when I added
if (...) { ... }
to my.rcrc
file and found thattrip.rc
fails in the same manner.I was calling rc with the
-l
flag.Should
if (...)
be visible across files? I did not expect it to be.