> On 12. Jan 2025, at 20:29, Andrej Shadura <[email protected]> wrote: > > On Sun, 12 Jan 2025, at 19:41, Yury V. Zaytsev wrote: >> We (the developers of Midnight Commander) would also find DASH_VERSION >> to be a useful inclusion. Thanks! > > Why do you find it useful? What would be the purpose of it? Dash is supposed > to be POSIX-compatible, so there isn’t a need for feature detection as with > bash or zsh, and I don’t think the version of dash itself is a useful > indicator of particular features being available or not.
We use these variables in our shell detection code to disambiguate between different shells with the same name. In this case, we want to differentiate Dash from Busybox ASH. If ash is symlinked to dash we can use that, but if not, we could check for DASH_VERSION variable. The reason why we want to disambiguate the two is this “supposed” word in your sentence about POSIX compatibility ;-) > I am definitely not going to add this in a Debian-specific patch. If you’re > interested in having this feature, please talk to the upstream. I’m not going > to do that, since I disagree with this addition for the reasons I outlined > above. Well, no big deal... Busybox has added BB_ASH_VERSION some years ago, so whatever is called ash and doesn’t advertise BB_ASH_VERSION must be Dash… or an old version of Busybox ASH - thus in a few years the problem will definitively resolve itself. Also, I thought that you are somehow in touch with upstream and can forward Debian stuff to them - or maybe it’s even being developed under the auspices of Debian now (as in D for Debian?). I tried to reach them awhile ago asking for HISTCONTROL implementation via some Australian mailing list, which was supposedly the right point of contact. Unfortunately, all I’ve got was a resounding silence, so I don’t know if the project is even maintained at all. So I’ve got an impression that maybe Debian tracker is the right way to talk to upstream, which it obviously doesn’t seem to be. Anyways, good to have this bug taken care of in one way or another. Thanks! All the best, Yury

