mahahahad / Minishell

1 stars 1 forks source link

feat: added the export, pwd and echo builtin #19

Closed Ali-Danish-72 closed 3 months ago

Ali-Danish-72 commented 3 months ago

The export builtin is complete in all of its functionality. When run without arguments, it will print the list of environment variables in alphabetical order. When run with arguments, it will go through them to ensure validity and assign the new variables to the list as well as the matrix according to the behavior of the original export builtin.

An empty value will not update the matrix. An existing key without a value does nothing where an existing key with a value is updated in the matrix as well as list. A new key with no value is added to the matrix and the list, and will display the key correctly when prompted. A new key with value is added to the matrix and the list.

Ali-Danish-72 commented 3 months ago

While you're testing the export, take a look at the pwd as well. Also don't worry about the Mac test, It's crying about the readline functions.

Ali-Danish-72 commented 3 months ago

Somehow the previous PR closed so I had to open this one. This is practically a clone of the #18 PR.

Ali-Danish-72 commented 3 months ago

Could we remove the MacOS compilation check? It seems rather redundant to keep it, considering the fact that as we progress, readline is going to become more necessary.

Ali-Danish-72 commented 3 months ago

As I keep on waiting for the review, I keep adding bits and pieces here and there 😅