[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox-cvs
Subject:    [git commit] shell: update comments on the status of [[ ]] compat
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2020-10-31 3:32:34
Message-ID: 20201031032014.3AB028624E () busybox ! osuosl ! org
[Download RAW message or body]

commit: https://git.busybox.net/busybox/commit/?id=a7c065354f820560621aa5f2e90498d6636f41c3
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
 shell/ash.c  | 6 +++---
 shell/hush.c | 3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/shell/ash.c b/shell/ash.c
index cfcc0b818..674a41bd3 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -209,15 +209,15 @@
  * Status of [[ support:
  *   && and || work as they should
  *   = is glob match operator, not equality operator: STR = GLOB
- *   (in GLOB, quoting is significant on char-by-char basis: a*cd"*")
  *   == same as =
- *   add =~ regex match operator: STR =~ REGEX
+ *   =~ is regex match operator: STR =~ REGEX
  * TODO:
  * singleword+noglob expansion:
  *   v='a b'; [[ $v = 'a b' ]]; echo 0:$?
  *   [[ /bin/n* ]]; echo 0:$?
  * quoting needs to be considered (-f is an operator, "-f" and ""-f are not; etc)
- * ( ) < > should not have special meaning
+ * ( ) < > should not have special meaning (IOW: should not require quoting)
+ * in word = GLOB, quoting should be significant on char-by-char basis: a*cd"*"
  */
 #define    BASH_TEST2           (ENABLE_ASH_BASH_COMPAT * ENABLE_ASH_TEST)
 #define    BASH_SOURCE          ENABLE_ASH_BASH_COMPAT
diff --git a/shell/hush.c b/shell/hush.c
index 7c1e1d748..ab7263381 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -63,7 +63,6 @@
  *      reserved words: function select
  *      advanced test: [[ ]]
  *      process substitution: <(list) and >(list)
- *      =~: regex operator
  *      let EXPR [EXPR...]
  *          Each EXPR is an arithmetic expression (ARITHMETIC EVALUATION)
  *          If the last arg evaluates to 0, let returns 1; 0 otherwise.
@@ -85,11 +84,11 @@
  *   v='a b'; [[ $v = 'a b' ]]; echo 0:$?
  *   [[ /bin/n* ]]; echo 0:$?
  *   = is glob match operator, not equality operator: STR = GLOB
- *   (in GLOB, quoting is significant on char-by-char basis: a*cd"*")
  *   == same as =
  *   =~ is regex match operator: STR =~ REGEX
  * TODO:
  * quoting needs to be considered (-f is an operator, "-f" and ""-f are not; etc)
+ * in word = GLOB, quoting should be significant on char-by-char basis: a*cd"*"
  */
 //config:config HUSH
 //config:	bool "hush (68 kb)"
_______________________________________________
busybox-cvs mailing list
busybox-cvs@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic