- 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
37f88a8649
commit
6a55d3e0eb
@ -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…
x
Reference in New Issue
Block a user