-
-
Notifications
You must be signed in to change notification settings - Fork 402
feat: added zmodload #4143
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
base: main
Are you sure you want to change the base?
feat: added zmodload #4143
Conversation
📊 Quantitative test results for language: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add zmodload
to unix-shell.data
, then update unix-shell-4andup.ra
using the script in the header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zmodload
is a builltin. I thought the file was for variables and binaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. However, we also have environment variables in that file and from a usage point, a binary on the path is usable the same way as a builtin. I'd say, add it to the list and add a comment to the header, explaining that the list also contains builtins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'd mean we need to cover a lot of other builtins, probably another PR? I only came up with zmodload
because I realized how dangerous it's usage can be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are probably tons of builtins we don't cover today, so every addition is good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find any reference to alias
binary(e.g., apt-file search alias | grep /bin/alias
), but alias
is added, probably a oversight.
coreruleset/rules/unix-shell.data
Line 44 in 6a9bf20
bin/alias |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. That used to be just alias
in 932100. Nice find.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed some others: fg, bg, chdir etc. There could be more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more (for a new PR maybe):
bin/builtin
bin/done
bin/endif
bin/endsw
bin/esac
bin/fi
bin/foreach
bin/function
bin/history
bin/hup
bin/repeat
bin/set
bin/setenv
Some others are builtins, but also exist as separated binaries so we cannot remove:
bin/echo
bin/local
bin/printenv
And maybe we also want to add sudo-rs
? reference
No description provided.