From cd9657faea14bf5fe0019bee80c3bc60e6b765b7 Mon Sep 17 00:00:00 2001 From: gwojda Date: Wed, 22 Mar 2017 16:02:37 +0100 Subject: [PATCH] fin fix completion --- 42sh/src/completion/c_find_files.c | 2 +- 42sh/src/completion/c_match.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/42sh/src/completion/c_find_files.c b/42sh/src/completion/c_find_files.c index bc621a50..6052b698 100644 --- a/42sh/src/completion/c_find_files.c +++ b/42sh/src/completion/c_find_files.c @@ -6,7 +6,7 @@ /* By: alao +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/09 13:31:21 by alao #+# #+# */ -/* Updated: 2017/03/22 12:57:02 by gwojda ### ########.fr */ +/* Updated: 2017/03/22 16:02:18 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/completion/c_match.c b/42sh/src/completion/c_match.c index 07391a64..3c9b3a0f 100644 --- a/42sh/src/completion/c_match.c +++ b/42sh/src/completion/c_match.c @@ -6,7 +6,7 @@ /* By: alao +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/10/15 13:27:14 by alao #+# #+# */ -/* Updated: 2017/03/22 15:49:09 by gwojda ### ########.fr */ +/* Updated: 2017/03/22 16:02:25 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ @@ -70,11 +70,11 @@ int c_matching(t_data *s, t_comp *c) char *current_word; current_word = c_current_words(); - if (ft_strchr(c->rcmd, '/')) + if (ft_strchr(current_word, '/')) c_seek_abs_path(c, current_word); - else if (ft_strchr(c->rcmd, '$')) + else if (ft_strchr(current_word, '$')) c_seek_env(c, current_word); - else if (c->rcmd[0] != '.' && !(ft_strchr(c->rcmd, ' '))) + else if (current_word[0] != '.' && !(ft_strchr(c->rcmd, ' '))) c_seek_binary(s, c); else c_seek_files(s, c, current_word);