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

[Q] Can bash compatibility in toysh be turned off during build time and during run time? #495

Open
xplshn opened this issue Apr 13, 2024 · 2 comments

Comments

@xplshn
Copy link

xplshn commented Apr 13, 2024

Also, does it respect POSIXLY_CORRECT=1? (even tho POSIXLY_CORRECT=1 doesn't really make Bash "POSIXLY CORRECT")

It'd be great if one could make Toybox NOT rely on any non-POSIX behavior, is that part of the roadmap?

@landley
Copy link
Owner

landley commented Apr 14, 2024

Not yet. I might add that later (since it is a feature bash has), but I'm not likely to put a LOT of work into reimplementing dash. You can install dash alongside if you really need a hairshirt to make sure your code doesn't step out of line.

@xplshn
Copy link
Author

xplshn commented Apr 14, 2024

No no, I didn't mean to imply something like dash was needed, dash itself doesn't respect standards either, it has deleted lots of functionality needed for an interactive shell, I was simply asking if non-POSIX features were implemented in a way that allowed to know that they are being used and also to disable them, and now that I know it isn't that way, it'd be great if they were implemented in a separate, optional file. So that the burden of developing an entire shell could be broken down into two milestones:

  1. POSIX Shell compatibility that passes the shellcheck tests
  2. BASH extensions that some users may need. (which Busybox's ash does have)

Anyways, thanks for everything, toybox is a great resource when it comes to implementing these tools on my own, the source code is small and mostly readable for someone that doesn't code a lot in C.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants