diff --git a/42sh/src/completion/c_match_glob.c b/42sh/src/completion/c_match_glob.c index 43d2cf9c..42be1d1e 100644 --- a/42sh/src/completion/c_match_glob.c +++ b/42sh/src/completion/c_match_glob.c @@ -6,7 +6,7 @@ /* By: gwojda +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/08 17:20:01 by gwojda #+# #+# */ -/* Updated: 2017/03/23 00:06:08 by gwojda ### ########.fr */ +/* Updated: 2017/03/29 13:33:32 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ @@ -55,11 +55,11 @@ static int c_glob_pos(char *str, size_t pos) pos = data_singleton()->line.pos; if (!str) return (-1); - if (pos && str[pos] == ' ') + if (pos && (str[pos] == ' ' || str[pos] == ';')) --pos; - while (pos && str[pos] != ' ') + while (pos && str[pos] != ' ' && str[pos] != ';') --pos; - if (str[pos] == ' ') + if (str[pos] == ' ' || str[pos] == ';') ++pos; return (pos); }