Emanuele considered: >> whether accepting an empty prompt string is useful or >> is just an indirect way of disabling the P command.
This is not an either-or dilemma. Disabling the prompt, perhaps by making it empty, is a useful capability. If setting an empty prompt string is the only way to disable the prompt, then setting an empty prompt string is a useful mechanism. Earlier versions of ed(1) did allow empty prompt strings, but the current GNU ed does not allow empty prompts. === Recommendation: Provide the capability to disable the prompt. ======================================================== Apparently this can be done by one of two mechanisms: 1) Remove the check for a non-empty prompt string, or 2) Add some "disable prompt" command line option. Mechanism (1) takes classic, simple, code as primary, and doesn't mind being a bit fast and loose with the POSIX standard, on an issue that quite possibly the POSIX standard authors didn't even specifically deliberate all that carefully in the first place. Mechanism (2) takes the POSIX standard as primary, and provides such code as must be provided to precisely honor that standard, as best as it can be read, either explicitly or implicitly. Any additional capability that is deemed desirable and worth implementing is provided using explicitly non-POSIX code, extensions, and options. As an old school hacker, I naturally prefer (1). Though I also know well that some of the "old school" hackery I wrote was best put out of its misery, and its users and maintainers misery, long ago. The current maintainers of this (and many other) commands have more respect for the standards than I do, and may well choose the alternative. That's their call, so far as I'm concerned. I remain immeasurably grateful for their continued work. (I won't resist grumbling a bit however ... it's only by exploring the unstated implications of allowing both "-pPROMPT" and "-p PROMPT" syntax that we can infer that POSIX standards intended to explicitly require "PROMPT" to be a non-empty string. I'd wager a pretty pence that there is no evidence that this implication was ever explicitly considered and deliberately chosen by any POSIX standards body.) -- Paul Jackson jack...@fastmail.fm