feat(nsh): input (stdin) redirection

This adds support for `<` to redirect input on nsh commands.
This commit is contained in:
Marco Casaroli
2024-08-06 23:29:50 +02:00
committed by Alan Carvalho de Assis
parent 875f2fcc1e
commit 96100b30f2
11 changed files with 269 additions and 120 deletions

View File

@@ -54,7 +54,7 @@ static int nsh_script_redirect(FAR struct nsh_vtbl_s *vtbl,
fd = open(CONFIG_NSH_SCRIPT_REDIRECT_PATH, 0666);
if (fd > 0)
{
nsh_redirect(vtbl, fd, save);
nsh_redirect(vtbl, 0, fd, save);
}
}