On Tue, 2019-04-16 at 14:57 -0400, Chet Ramey wrote:
> Why take so much effort to (imperfectly) figure out and display
> things you already know?
Correctness. If what the user knows doesn't match what the program
knows then they might think that the program is buggy or that there is
something mal
On Tue, 2019-04-16 at 12:38 +0700, Robert Elz wrote:
> That's really hard to do and do correctly.
I was operating on the assumption that it could be done in the same way
that the $? and $PIPESTATUS variables are created/updated.
> There's no way to pass variables back from a subshell
I think I
On Mon, 2019-04-15 at 17:31 -0400, Chet Ramey wrote:
> You can use $HISTCMD with a slight fix that's now in the devel branch.
That doesn't increment when you use HISTCONTROL=erasedups AFAICT but
the command number does increment. Also HISTCMD doesn't start at zero.
> The Korn shell uses values >
On Sun, 2019-04-14 at 17:28 -0400, Chet Ramey wrote:
> That's the number of positional parameters.
Oops, I mean the command number variable \# that is available at PS1
evaluation time but not when PROMPT_COMMAND is run. I was able to
workaround this by deferring the decision to display the status
Hi folks,
I wanted a way in bash to print the status of the last command I ran,
including information about each command in a pipe and about signals.
I noticed that bash does not have the ability to display a command
result, so I came up with the attached prompt configuration.
I am hoping that f