sophiakoulen / minishell

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

Inconsistent behaviour when escaping wildcards with backslash #126

Open sophiakoulen opened 1 year ago

sophiakoulen commented 1 year ago

echo \* prints \*, which should be just *. I know we do not have to interpret backslashes, but in our implementation backslashes can escape $, quotes and whitespaces already. If we choose to add the backslash feature, it is important that we do it consistently, else our "feature" (which is not asked for) could be seen as a bug.

sophiakoulen commented 1 year ago

Similarly, if we handle backslash escaping, we should be able to escape characters like | , <, & during tokenization. This shouldn't be hard to do if we reuse the update_state function.

znichola commented 1 year ago

yes, this follows, and makes sense. But I will take the library of also adding the side-quest label.