3 ms·
If programs had to use an API to expand paths then developers would screw it up. Just look at the clusterfuck that is the command prompt on Windows! In theory
by yrro 11y ago
If programs had to use an API to expand paths then developers would screw it up. Just look at the clusterfuck that is the command prompt on Windows!
In theory this applies to shell developers as well; however POSIX specifies how expansions should work, and there are far fewer shells than there are programs that those shells launch; and shells that don't conform to POSIX are less likely to find adoption because they will break user expectation.
- alkonaut 11y agoYes, I know shells are fewer than programs, but shouldn't the OS provide an implementation if something is specified by posix? Can't see the downside of at least several shells using the same OS-provided function for it.
- yrro 11y agoGNU/Linux kinda does. https://www.gnu.org/software/libc/manual/html_node/Pattern-Matching.html#Pattern-Matching https://www.gnu.org/software/libc/manual/html_node/Pattern-M... Don't know if they are commonly used by shells however.