diff options
author | 2024-06-23 23:35:13 +0100 | |
---|---|---|
committer | 2024-06-23 23:35:13 +0100 | |
commit | 58cca9b40298f5b2e0f45963488e1ed50a1d0048 (patch) | |
tree | 105485f9e8f6f91fb5f44f97786fb9285c22fb7b | |
parent | Rectify several typos among the comments (diff) | |
download | gentoo-functions-58cca9b40298f5b2e0f45963488e1ed50a1d0048.tar.gz gentoo-functions-58cca9b40298f5b2e0f45963488e1ed50a1d0048.tar.bz2 gentoo-functions-58cca9b40298f5b2e0f45963488e1ed50a1d0048.zip |
Have is_subset() permit the empty string as a sentinel
I can think of no compelling reason not to.
Signed-off-by: Kerin Millar <kfm@plushkava.net>
-rw-r--r-- | functions.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/functions.sh b/functions.sh index 55b6c3e..7e09611 100644 --- a/functions.sh +++ b/functions.sh @@ -176,15 +176,15 @@ is_anyof() # # Collects the intersection of the parameters up to - but not including - a # sentinel value then determines whether the resulting set is a subset of the -# intersection of the remaining parameters. If the SENTINEL variable is set and -# non-empty, it shall be taken as the value of the sentinel. Otherwise, the -# value of the sentinel shall be defined as <hyphen-dash><hyphen-dash>. If the -# sentinel value is not encountered or if either set is empty then the return -# value shall be greater than 1. +# intersection of the remaining parameters. If the SENTINEL variable is set, it +# shall be taken as the value of the sentinel. Otherwise, the value of the +# sentinel shall be defined as <hyphen-dash><hyphen-dash>. If the sentinel value +# is not encountered or if either set is empty then the return value shall be +# greater than 1. # is_subset() { - SENTINEL=${SENTINEL:-'--'} awk -f - -- "$@" <<-'EOF' + SENTINEL=${SENTINEL-'--'} awk -f - -- "$@" <<-'EOF' BEGIN { argc = ARGC ARGC = 1 |