Skip to content

Commit 1fa7e70

Browse files
committed
Added comments to clarify that return 0 means true even though 0 is typically 'falsey'
1 parent 0a9785f commit 1fa7e70

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

argument-parser.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,17 @@ argUnexpected() {
127127

128128
argExists() {
129129
if [ -z ${argv["$1"]+abc} ]; then
130-
return 1
130+
return 1 # false
131131
else
132-
return 0
132+
return 0 # true
133133
fi
134134
}
135135

136136
argHasDefault() {
137137
if [ -z ${argd["$1"]+abc} ]; then
138-
return 1
138+
return 1 # false
139139
else
140-
return 0
140+
return 0 # true
141141
fi
142142
}
143143

0 commit comments

Comments
 (0)