Closed saladuit closed 1 year ago
You'll have the crack the first case:
[x] exit | doesn't work. I've commented out the test cases.
exit |
[x] Maybe a rewrite for is_tokenchar()?
if (is_tokenchar(&command_line[i])) return (is_tokenchar(&command_line[i]));
is quite ugly, could and maybe should be replaced with something better. For example:
if (is_metachar(command_line[i]) return (metachar_len(&command_line[i]));
In this case you only have to rename is_tokenchar() to metachar_len() and write is_metachar();
Also need to check the following cases:
exit (, <, >: bash: syntax error near unexpected token `newline'
exit ): bash: syntax error near unexpected token `)'
You'll have the crack the first case:
[x]
exit |
doesn't work. I've commented out the test cases.[x] Maybe a rewrite for is_tokenchar()?
is quite ugly, could and maybe should be replaced with something better. For example:
In this case you only have to rename is_tokenchar() to metachar_len() and write is_metachar();