fixes
This commit is contained in:
@@ -17,9 +17,16 @@ static void handle_input(char *in, t_msh *msh)
|
||||
{
|
||||
if (ft_strlen(in) > 0 && !is_only_space(in))
|
||||
{
|
||||
add_history(in);
|
||||
ft_fprintf(msh->hist, "%s\n", in);
|
||||
if (ft_strlen(in) != ft_strlen(msh->prev_input) ||
|
||||
ft_strncmp(in, msh->prev_input, -1) != 0)
|
||||
{
|
||||
add_history(in);
|
||||
ft_fprintf(msh->hist, "%s\n", in);
|
||||
}
|
||||
}
|
||||
ft_free(&msh->prev_input);
|
||||
if (in)
|
||||
msh->prev_input = ft_strdup(in);
|
||||
}
|
||||
|
||||
char *get_pwd(void)
|
||||
|
||||
Reference in New Issue
Block a user