Skip to content

Commit 4b289af

Browse files
committed
🐚 Adds ShellCheck suggested edits
1 parent f5b4905 commit 4b289af

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
@@ -50,7 +50,8 @@ argument_parser__scrub__list(){
5050
# argument_parser__scrub__number -99.88.33-77
5151
# #> -99.88
5252
argument_parser__scrub__number(){
53-
local _value="$(sed '{
53+
local _value
54+
_value="$(sed '{
5455
s@\.\.*@.@g;
5556
s@--*@-@g;
5657
}' <<<"${@//[^0-9.-]/}")"
@@ -88,7 +89,8 @@ argument_parser__scrub__path(){
8889
# argument_parser__scrub__posix '_$spam" "flavored_spam'
8990
# #> spamflavored_spam
9091
argument_parser__scrub__posix(){
91-
local _value="$(sed '{
92+
local _value
93+
_value="$(sed '{
9294
s@^[-_.]@@g;
9395
s@[-_.]$@@g;
9496
s@\.\.*@.@g;
@@ -186,8 +188,6 @@ argument_parser(){
186188
local _opt_name
187189
local _var_name
188190
local _opt_type
189-
local _valid_opts_pattern
190-
local _valid_opts_pattern_alt
191191
local _args_user_list_index
192192
local _user_opt
193193
local _var_value

0 commit comments

Comments
 (0)