correction match .> + tab
This commit is contained in:
parent
4ba59d089b
commit
f0e931b44d
2 changed files with 7 additions and 5 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: alao <alao@student.42.fr> +#+ +:+ +#+ */
|
/* By: alao <alao@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/01/09 13:31:21 by alao #+# #+# */
|
/* Created: 2017/01/09 13:31:21 by alao #+# #+# */
|
||||||
/* Updated: 2017/03/21 14:53:21 by gwojda ### ########.fr */
|
/* Updated: 2017/03/22 12:57:02 by gwojda ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -88,7 +88,7 @@ int c_seek_files(t_data *s, t_comp *c, char *current_word)
|
||||||
if (c->rcmd[0] == '.')
|
if (c->rcmd[0] == '.')
|
||||||
{
|
{
|
||||||
c->cpath = ft_strdup("./");
|
c->cpath = ft_strdup("./");
|
||||||
c->match = ft_strdup(".");
|
c->match = ft_strdup(current_word);
|
||||||
}
|
}
|
||||||
if (c->cpath == NULL)
|
if (c->cpath == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: alao <alao@student.42.fr> +#+ +:+ +#+ */
|
/* By: alao <alao@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/10/15 13:27:14 by alao #+# #+# */
|
/* Created: 2016/10/15 13:27:14 by alao #+# #+# */
|
||||||
/* Updated: 2017/03/22 12:44:00 by alao ### ########.fr */
|
/* Updated: 2017/03/22 12:58:21 by gwojda ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -49,9 +49,11 @@ static char *c_current_words(t_comp *c)
|
||||||
input_len = ft_strlen(data_singleton()->line.input);
|
input_len = ft_strlen(data_singleton()->line.input);
|
||||||
if (pos >= ft_strlen(c->rcmd))
|
if (pos >= ft_strlen(c->rcmd))
|
||||||
pos = ft_strlen(c->rcmd) - (input_len - pos + 1);
|
pos = ft_strlen(c->rcmd) - (input_len - pos + 1);
|
||||||
while (pos && c->rcmd[pos] != ' ')
|
while (pos && c->rcmd[pos] != ' ' && c->rcmd[pos] != '<'
|
||||||
|
&& c->rcmd[pos] != '>' && c->rcmd[pos] != '\n')
|
||||||
--pos;
|
--pos;
|
||||||
if (c->rcmd[pos] == ' ')
|
if (c->rcmd[pos] == ' ' || c->rcmd[pos] == '<'
|
||||||
|
|| c->rcmd[pos] == '>' || c->rcmd[pos] == '\n')
|
||||||
++pos;
|
++pos;
|
||||||
return (c->rcmd + pos);
|
return (c->rcmd + pos);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue