Print expanded variables if -x

This commit is contained in:
David Sidrane
2017-04-05 18:31:47 -06:00
committed by Gregory Nutt
parent d03aa9112e
commit 35cf98d4df
3 changed files with 10 additions and 5 deletions

View File

@@ -1169,6 +1169,11 @@ static FAR char *nsh_argexpand(FAR struct nsh_vtbl_s *vtbl, FAR char *cmdline,
envstr = nsh_envexpand(vtbl, ptr);
if ((vtbl->np.np_flags & NSH_PFLAG_SILENT) == 0)
{
nsh_output(vtbl," %s=%s\n", ptr, envstr ? envstr :"(null)");
}
/* Concatenate the result of the operation with the accumulated
* string. On failures to allocation memory, nsh_strcat will
* just return value value of argument