FjjDessoyCaraballo / minishell

This project aims to replicate bash shell
1 stars 3 forks source link

tokenization with extra space #1

Closed FjjDessoyCaraballo closed 3 months ago

FjjDessoyCaraballo commented 3 months ago

At the end of the tokenizing, there seems to be an extra space being splitted into the array/linked list. This could lead into problems later.

Torutu commented 3 months ago

show me what kind of test you did so I can work around that and anything related to it, you can add pictures or screenshots to show me how it looks like for you

FjjDessoyCaraballo commented 3 months ago

Thanks for reminding me of the input. I tried with many inputs, and the behavior persists:

Screenshot from 2024-07-10 11-22-44 Screenshot from 2024-07-10 11-24-58

The string is ending with spaces (multiple and single) and the last unknown command always returns one extra space.

Torutu commented 3 months ago

check now and please confirm and close if it works as it should 😃

image

these inputs have spaces behind and front of the command (there should be a better way to show that we actually added spaces to these inputs 😅)