- Provide a reasonable error message for `export -p var'.
- Use argv rather than argptr since getopt() is used here.
This commit is contained in:
parent
e4c880af3f
commit
3fda45eca8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149919
@ -541,9 +541,11 @@ exportcmd(int argc, char **argv)
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
if (values && argc != 0)
|
||||
error("-p requires no arguments");
|
||||
listsetvar(cmdenviron);
|
||||
if (argc != 0) {
|
||||
while ((name = *argptr++) != NULL) {
|
||||
while ((name = *argv++) != NULL) {
|
||||
if ((p = strchr(name, '=')) != NULL) {
|
||||
p++;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user