summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-12-11 18:37:28 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-12-11 18:37:28 +0100
commit3a01a095ada34cf088523b0302dafa2bde7e3461 (patch)
treefc722f544898e7cbf6a09cc6ebadbad7aea1052a /src
parentIn progress (diff)
download42-minishell-3a01a095ada34cf088523b0302dafa2bde7e3461.tar.gz
42-minishell-3a01a095ada34cf088523b0302dafa2bde7e3461.tar.bz2
42-minishell-3a01a095ada34cf088523b0302dafa2bde7e3461.tar.xz
42-minishell-3a01a095ada34cf088523b0302dafa2bde7e3461.tar.zst
42-minishell-3a01a095ada34cf088523b0302dafa2bde7e3461.zip
Done
Diffstat (limited to 'src')
-rw-r--r--src/m_loop.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/m_loop.c b/src/m_loop.c
index e658593..18636da 100644
--- a/src/m_loop.c
+++ b/src/m_loop.c
@@ -67,10 +67,9 @@ static void m_parse_and_run_line(char line[],
while (msh->com->argv != NULL && msh->com->argv[i] != NULL)
i++;
if (msh->com->argv != NULL && msh->com->argv[0] != NULL)
- ft_dprintf(1, "\r[%s]\n", msh->com->argv[i]);
+ u_subst_var_value("$_", msh->com->argv[i - 1], msh);
else
- ft_dprintf(1, "\r[%s]\n", msh->com->bin);
- /* u_subst_var_value("$_", const char *newval, msh); */
+ u_subst_var_value("$_", msh->com->bin, msh);
}
e_line_block(msh);
s_com_destroy(&msh->com);