fix: [ and ==, sh-agnostic
This commit is contained in:
+3
-3
@@ -1,4 +1,4 @@
|
||||
std::mod::init clap 0.1.0
|
||||
std::mod::init clap 0.1.1
|
||||
|
||||
##
|
||||
# must be called after declaring a `clap__flags` as associative arrays, where:
|
||||
@@ -81,11 +81,11 @@ clap::parse() {
|
||||
}
|
||||
|
||||
clap::flag::is-short() {
|
||||
[ "${1:0:1}" == "-" ] && [ "${1:1:1}" != "-" ]
|
||||
[[ "${1:0:1}" == "-" ]] && [[ "${1:1:1}" != "-" ]]
|
||||
}
|
||||
|
||||
clap::flag::is-long() {
|
||||
[ "${1:0:1}" == "-" ] && [ "${1:1:1}" == "-" ]
|
||||
[[ "${1:0:1}" == "-" ]] && [[ "${1:1:1}" == "-" ]]
|
||||
}
|
||||
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user