Date: Mon, 9 Oct 2023 14:51:29 -0400 From: Chet Ramey <chet.ra...@case.edu> Message-ID: <a693454f-dd2e-49c7-a5ea-6597efbee...@case.edu>
| That's my beef, but, strictly speaking, neither do pushd/popd/dirs. Those we have as (optional) functions only, but no-one uses them (with the NetBSD sh) that I know of. But they're not really in competition, a different solution to a different problem. | You might consider the ${param//old/new} expansion if it's available. Not worth it, I prefer only portable sh code, it just isn't worth the hassle of maintaining different versions for different shells. | The directory stack is good for this as well, Better for making temporary excursions while looking for something, then returning. Too restricted for arbitrary jumping between versions. | I don't usually work with more | than two directories at once, for which `cd -' suffices. I currently have 6 complete NetBSD source trees (8, 9, 10-beta, current, and testing (newer than current), plus the version that generated the binaries installed in /bin (etc)) - retrofitting updates into older versions (and to my running version) needs the ability to flip around to all of those. kre