From 5a04264ecf5f0f853f2d562b4c5efb139d3d4a9d Mon Sep 17 00:00:00 2001 From: Yaniv Levinsky Date: Sun, 24 Jun 2018 19:16:56 +0300 Subject: cmd: nvedit: set H_INTERACTIVE in do_env_default The function set_default_vars() in common.c adds H_INTERACTIVE to the h_import() flag, but the function has no way of telling if the command actually was user directed like this flag suggest. The flag should be set by the calling function do_env_default() in nvedit.c instead, where the command is certainty user directed. Move the H_INTERACTIVE flag from set_default_vars() to do_env_default(). Signed-off-by: Yaniv Levinsky Acked-by: Igor Grinberg --- env/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'env/common.c') diff --git a/env/common.c b/env/common.c index 6cf5edd..05183a4 100644 --- a/env/common.c +++ b/env/common.c @@ -97,7 +97,7 @@ int set_default_vars(int nvars, char * const vars[], int flags) * Special use-case: import from default environment * (and use \0 as a separator) */ - flags |= H_NOCLEAR | H_INTERACTIVE; + flags |= H_NOCLEAR; return himport_r(&env_htab, (const char *)default_environment, sizeof(default_environment), '\0', flags, 0, nvars, vars); -- cgit v1.1