Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] Is += part of the subject? #168

Open
itislu opened this issue Feb 9, 2024 · 2 comments
Open

[QUESTION] Is += part of the subject? #168

itislu opened this issue Feb 9, 2024 · 2 comments
Assignees
Labels
lea wontfix Lea will not work on this medium priority This issue would be nice to be fixed question Further information is requested

Comments

@itislu
Copy link
Collaborator

itislu commented Feb 9, 2024

This matters for both export and for local variable assignment.

If a += is specified instead of an = in shell variable assignments or in arguments to export, the previous value (if it existed) should not be replaced with the new value.
Instead, the new value should be appended to the old value.

In the context where an assignment statement is assigning a value to a shell variable or array index (see Arrays), the ‘+=’ operator can be used to append to or add to the variable’s previous value.

Bash manual


It should not be too difficult to add this feature, but ofc it touches almost everything, starting from the Lexer and going all the way to the final_cmd_table and export.

@itislu itislu added question Further information is requested medium priority This issue would be nice to be fixed labels Feb 9, 2024
@itislu
Copy link
Collaborator Author

itislu commented Feb 9, 2024

I think that it actually is, at least for export.

The Subject:

Your shell must implement the following builtins:

  • export with no options

+= is not an option to export, it is part of the normal arguments.

@LeaYeh
Copy link
Owner

LeaYeh commented Feb 16, 2024

But I dont want to implement all of features XD
I dont think it is worth to investment the time and I wont fail anyone with this

@LeaYeh LeaYeh added the lea wontfix Lea will not work on this label Feb 16, 2024
@itislu itislu added the optional feature Cool but not mandatory feature label Jul 23, 2024
@itislu itislu removed the optional feature Cool but not mandatory feature label Jul 23, 2024
@itislu itislu self-assigned this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lea wontfix Lea will not work on this medium priority This issue would be nice to be fixed question Further information is requested
Projects
Status: Backlog
Development

No branches or pull requests

2 participants