Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Does anyone know if there are any plans to add a more complete POSIX feature set to "dash"? At least in Debian, things like the set -o vi directive does not work at all. Commented Mar 26, 2023 at 8:49
  • @Kajukenbo, set -o vi (or set -o emacs) works if you enable it at compile time (configure --with-libedit), but the point of dash is to provide a simple robust and efficient interpreter for the sh language that can be used for system()/popen() or interpret #! /bin/sh - scripts. It's not intended for interactive use. Look at shells like zsh or fish for that. Commented Mar 26, 2023 at 11:18
  • I get the point that it is supposed to be small and fast, but how can people claim dash to be POSIX complaint all the time if it is not? set -o vi is very clearly part of the standard for /bin/sh. FWIW, I have no interest in using something like zsh or fish. I guess I will just stick with ksh88-based implementations. I doubt a simple recompile will fix all of the discrepancies anyway. Thanks for the reply. Commented Mar 26, 2023 at 12:42
  • @Kajukenbo, again dash supports set -o vi (note that in bash, the vi mode is also optional and can be disabled at build time). POSIX specifies a standard API. IMO, the shell's line editor does not belong there and should be removed from the standard or at least moved to the User Portability option. For instance, that line editor does not make sense on embedded systems. Note that ksh88 has many non-compliances and bugs, far more so than dash. If you want a more compliant shell, you can have a look at bosh or yash (each also coming with their own issues). Commented Mar 26, 2023 at 13:19