summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko2009-06-03 14:43:56 +0200
committerDenys Vlasenko2009-06-03 14:43:56 +0200
commit08218013499f76e61691d5ffa697465f800bd3a7 (patch)
tree23e34724adfb1aad3a6954c545fa3faef0ee9c71 /shell
parent6f22624a913e29c6a7088718bd3fd6052f917cc1 (diff)
downloadbusybox-08218013499f76e61691d5ffa697465f800bd3a7.zip
busybox-08218013499f76e61691d5ffa697465f800bd3a7.tar.gz
hush: document a TODO in export builtin
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/hush.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/shell/hush.c b/shell/hush.c
index de04c01..a6db16c 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -44,14 +44,28 @@
*
* Bash stuff (maybe optionally enable?):
* &> and >& redirection of stdout+stderr
- * Brace expansion
+ * Brace Expansion
* reserved words: [[ ]] function select
* substrings ${var:1:5}
*
* TODOs:
* grep for "TODO" and fix (some of them are easy)
- * builtins: ulimit
+ * builtins: ulimit, local
* follow IFS rules more precisely, including update semantics
+ * export builtin should be special, its arguments are assignments
+ * and therefore expansion of them should be "one-word" expansion:
+ * $ export i=`echo 'a b'` # export has one arg: "i=a b"
+ * compare with:
+ * $ ls i=`echo 'a b'` # ls has two args: "i=a" and "b"
+ * ls: cannot access i=a: No such file or directory
+ * ls: cannot access b: No such file or directory
+ * Note1: same applies to local builtin when we'll have it.
+ * Note2: bash 3.2.33(1) does this only if export word itself
+ * is not quoted:
+ * $ export i=`echo 'aaa bbb'`; echo "$i"
+ * aaa bbb
+ * $ "export" i=`echo 'aaa bbb'`; echo "$i"
+ * aaa
*
* Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
*/