From 58cca9b40298f5b2e0f45963488e1ed50a1d0048 Mon Sep 17 00:00:00 2001 From: Kerin Millar Date: Sun, 23 Jun 2024 23:35:13 +0100 Subject: Have is_subset() permit the empty string as a sentinel I can think of no compelling reason not to. Signed-off-by: Kerin Millar --- functions.sh | 12 ++++++------ 1 file 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 . 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 . 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 -- cgit v1.2.3-65-gdbad