summaryrefslogtreecommitdiffstats
path: root/src/c_init.c
diff options
context:
space:
mode:
authorsalad <fmoenne-@student.le-101.fr>2020-09-11 14:29:48 +0200
committersalad <fmoenne-@student.le-101.fr>2020-09-11 14:29:48 +0200
commitf9671485f8049fbc6909cc757eae851ac1b5e3b9 (patch)
tree1c1b8074f9478f34642487b929bedff093394636 /src/c_init.c
parentremove perruches (diff)
download42-minishell-f9671485f8049fbc6909cc757eae851ac1b5e3b9.tar.gz
42-minishell-f9671485f8049fbc6909cc757eae851ac1b5e3b9.tar.bz2
42-minishell-f9671485f8049fbc6909cc757eae851ac1b5e3b9.tar.xz
42-minishell-f9671485f8049fbc6909cc757eae851ac1b5e3b9.tar.zst
42-minishell-f9671485f8049fbc6909cc757eae851ac1b5e3b9.zip
home works, not END. lets go for a bit of norming
Diffstat (limited to 'src/c_init.c')
-rw-r--r--src/c_init.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/c_init.c b/src/c_init.c
index 8974007..3829a78 100644
--- a/src/c_init.c
+++ b/src/c_init.c
@@ -119,10 +119,18 @@ int16_t
{
return (c_key_right(ft_strlen(line), tcaps));
}
- else if (strncmp(buf, tcaps->CL, ft_strlen(tgetstr("kb", NULL))) == 0)
+ else if (strncmp(buf, tcaps->CL, 4) == 0)
{
return (c_ctrl_l(line, tcaps, msh));
}
+ else if (strncmp(buf, tcaps->HM, 4) == 0)
+ {
+ return (c_home_key(tcaps));
+ }
+ else if (strncmp(buf, tcaps->ND, 4) == 0)
+ {
+ return (c_end_key(ft_strlen(line), tcaps));
+ }
else if (strncmp(buf, tgetstr("kb", NULL), ft_strlen(tgetstr("kb", NULL))) == 0)
{
return (c_back_slash(&line, tcaps));