sophiakoulen / minishell

A simplified bash-like shell, with pipes, redirections and variable expansion.
3 stars 1 forks source link

Support comments #114

Closed sophiakoulen closed 1 year ago

sophiakoulen commented 1 year ago

Stop tokenizing at hashtag

znichola commented 1 year ago

This line should be modified to include a || *str == '#', and like you pointed out, while we're at it we can remove the redundant CRFL check as it's triggered on a \n and \r is white space that will get trimmed.

// line 30 in tokenizer.c
if (*str == '\0' || *str == '\n' || (*str == '\r' && *str + 1 == '\n'))