summaryrefslogtreecommitdiffstats
path: root/src/c_input.c
diff options
context:
space:
mode:
authorjoe <rbousset@42lyon.fr>2020-12-07 14:05:28 +0100
committerjoe <rbousset@42lyon.fr>2020-12-07 14:05:28 +0100
commit4c1865297f02111787b494cbcc599f268b8af240 (patch)
tree0eadce65542ab57a75edc81e29b3b8c571e968d6 /src/c_input.c
parentfix (diff)
download42-minishell-4c1865297f02111787b494cbcc599f268b8af240.tar.gz
42-minishell-4c1865297f02111787b494cbcc599f268b8af240.tar.bz2
42-minishell-4c1865297f02111787b494cbcc599f268b8af240.tar.xz
42-minishell-4c1865297f02111787b494cbcc599f268b8af240.tar.zst
42-minishell-4c1865297f02111787b494cbcc599f268b8af240.zip
changes
Diffstat (limited to 'src/c_input.c')
-rw-r--r--src/c_input.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/c_input.c b/src/c_input.c
index 9023f37..874d55a 100644
--- a/src/c_input.c
+++ b/src/c_input.c
@@ -22,15 +22,16 @@
#include "c_utils.h"
#include "m_prompt.h"
#include "m_loop.h"
+#include "u_vars.h"
short
- c_init_line(char psx, t_caps *tcaps)
+ c_init_line(char psx, t_caps *tcaps, t_msh *msh)
{
- char *term;
+ char term[4096];
if (tcaps)
{
- term = getenv("TERM");
+ u_get_var_value(term, "$TERM", 4096, msh);
if (!tgetent(NULL, term))
return (-1);
c_set_term_raw(1);