diff --git a/42sh/src/completion/c_find_env.c b/42sh/src/completion/c_find_env.c index 18686006..0ad450d1 100644 --- a/42sh/src/completion/c_find_env.c +++ b/42sh/src/completion/c_find_env.c @@ -6,7 +6,7 @@ /* By: gwojda +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/09 15:50:24 by gwojda #+# #+# */ -/* Updated: 2017/03/23 19:07:56 by gwojda ### ########.fr */ +/* Updated: 2017/03/27 18:50:23 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/completion/c_match.c b/42sh/src/completion/c_match.c index 36adb113..ee501368 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/27 17:48:25 by gwojda ### ########.fr */ +/* Updated: 2017/03/27 18:37:39 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/completion/c_match_update.c b/42sh/src/completion/c_match_update.c index e9195ea9..bda1b63b 100644 --- a/42sh/src/completion/c_match_update.c +++ b/42sh/src/completion/c_match_update.c @@ -6,7 +6,7 @@ /* By: alao +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 12:03:30 by alao #+# #+# */ -/* Updated: 2017/03/22 12:25:26 by alao ### ########.fr */ +/* Updated: 2017/03/27 18:50:28 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ @@ -25,7 +25,6 @@ static int c_refresh_match(t_comp *c, long int keypress) kpconv[1] = '\0'; tmp = c->match ? ft_strjoin(c->match, kpconv) : ft_strdup(kpconv); c->match ? ft_memdel((void *)&c->match) : (0); - c->match = ft_strdup(tmp); tmp ? ft_memdel((void *)&tmp) : (0); tmp = ft_strjoin(c->rcmd, kpconv); c->rcmd ? ft_memdel((void *)&c->rcmd) : (0); @@ -57,12 +56,12 @@ int c_rematch(t_comp *c, long int keypress) c_term_clear(c); c_refresh_match(c, keypress); c_clear_lst(c); + ft_print(keypress, &s->line.input, &s->line.pos); c_matching(s, c); if (s->comp && c->lst == NULL) c_clear(s); else if (s->comp && c->lst == c->lst->next) - return (1); - ft_print(keypress, &s->line.input, &s->line.pos); + return (ft_putchar('\b') + 1); return (1); } else diff --git a/42sh/src/history/history_parsing_toolz.c b/42sh/src/history/history_parsing_toolz.c index 3c384222..c6d0272f 100644 --- a/42sh/src/history/history_parsing_toolz.c +++ b/42sh/src/history/history_parsing_toolz.c @@ -6,7 +6,7 @@ /* By: gwojda +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/25 14:09:39 by gwojda #+# #+# */ -/* Updated: 2017/03/27 17:59:50 by gwojda ### ########.fr */ +/* Updated: 2017/03/27 18:07:49 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/lexer_backslash.c b/42sh/src/lexer/lexer_backslash.c index 2a0a62c0..bfcf5f5a 100644 --- a/42sh/src/lexer/lexer_backslash.c +++ b/42sh/src/lexer/lexer_backslash.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* lexer_backslash.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: jhalford +#+ +:+ +#+ */ +/* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/03 11:56:49 by jhalford #+# #+# */ -/* Updated: 2017/03/27 02:16:36 by jhalford ### ########.fr */ +/* Updated: 2017/03/27 18:14:22 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/lexer_dquote.c b/42sh/src/lexer/lexer_dquote.c index 51e50643..956ca773 100644 --- a/42sh/src/lexer/lexer_dquote.c +++ b/42sh/src/lexer/lexer_dquote.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/28 18:36:58 by jhalford #+# #+# */ -/* Updated: 2017/03/24 16:08:35 by gwojda ### ########.fr */ +/* Updated: 2017/03/27 18:15:29 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ @@ -30,6 +30,7 @@ int lexer_dquote(t_list **alst, t_lexer *lexer) lexer->pos++; if (lexer->str[lexer->pos] == 0) return (push(&lexer->stack, BACKSLASH) ? 0 : 0); + token_append(token, lexer, 1, 0); } else if (lexer->str[lexer->pos] == '`' && (lexer->state = BQUOTE)) return (lexer_lex(alst, lexer)); diff --git a/42sh/src/line_editing/readline.c b/42sh/src/line_editing/readline.c index 32788265..c88c7dfe 100644 --- a/42sh/src/line_editing/readline.c +++ b/42sh/src/line_editing/readline.c @@ -6,7 +6,7 @@ /* By: gwojda +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/15 14:19:48 by gwojda #+# #+# */ -/* Updated: 2017/03/27 17:38:51 by gwojda ### ########.fr */ +/* Updated: 2017/03/27 18:10:21 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ @@ -35,7 +35,6 @@ int readline(int has_prompt, char **input) if (has_prompt) ret = ft_history_parsing(has_prompt, input); ft_strdel(&data_singleton()->line.copy_tmp); - DG("ret = \"%s\"", *input); if (tcsetattr(0, TCSANOW, ft_save_termios(0)) == -1) return (-1); return (ret);