You are not logged in.
Oils shell, "osh" is designed to be "bash" shell compatible.
I changed a copy of Arch Linux "makepkg" script to use osh instead of "bash" in the shebang line.
Testing on a PKGBUILD: 10 errors or so, about "eval".
I think that osh purposefully avoids implementation of "eval" in favor of better methods.
https://stackoverflow.com/questions/183 … d-practice
Last edited by Gregory_M (2025-11-07 00:53:51)
Offline
If osh does not implement eval, then it is not bash compatible. I just looked at the eval use in makepkg and it all is mostly being done as eval is intended to be used. There are a few places where we could use bash-4.3+ features to avoid the eval, but these are in the minority, and makepkg has only recently bumped the bash requirement that recent.
BTW, your link is about eval in python.
Offline
Mod note: moving to Pacman discussion.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Online
There are a few places where we could use bash-4.3+ features to avoid the eval, but these are in the minority, and makepkg has only recently bumped the bash requirement that recent.
Thanks kindly for info.
If osh does not implement eval, then it is not bash compatible.
Thank you. I thought the issue was eval missing, but looking further, osh appears to have eval, so I pursued your sound reasoning path there and am discussing with the osh developers.
Ignore of course, unless curious...
This shows the errors that I encountered using osh: https://github.com/oils-for-unix/oils/issues/2556
I'm happy to post back here if I am able run a successful makepkg using osh (in case interesting to know).
Last edited by Gregory_M (2025-11-07 08:20:24)
Offline
Is there a debug mode for osh? Because the error you have in that Github issue post contradicts itself - it expects a "Str", but got a "Str":
Keys op expected Str, BashArray, or BashAssoc, got StrBtw: if I read their "Project Goals" correctly, they are NOT aiming to be Bash compatible, but rather an extension similar to Typescript being an extension to JavaScript. But this is the first I heard of osh, so I could be wrong.
Offline
Is there a debug mode for osh? Because the error you have in that Github issue post contradicts itself - it expects a "Str", but got a "Str":
Keys op expected Str, BashArray, or BashAssoc, got Str
Hi, yes, the error itself needs improvement. I am a fellow victim of the confusing message, not the spokesperson for osh. :-) (RE: osh bash compatibility, yes, it's intended. [Off topic, unless using for Arch, e.g. makepkg] Refer to osh for info. pacman shows link.)
pacman -Si oilLast edited by Gregory_M (2025-11-12 01:24:58)
Offline