mahahahad / Minishell

1 stars 1 forks source link

feat: added the export builtin #18

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 review this, take a look at the pwd function I wrote.