shell-mommy icon indicating copy to clipboard operation
shell-mommy copied to clipboard

FIX: Prompt Command Detection (Also Code Style from PR 16)

Open ChristianSilvermoon opened this issue 2 years ago • 0 comments

I believe I've reasonably solved the the TODO:

TODO: add a way to check if we're running from PROMPT_COMMAND to use the previous exit code instead of doing things this way

By checking if our argument matches what the README suggests for $PROMPT_COMMAND's value, Shell Mommy can be confident that she is in fact, in all likelyhood, running from $PROMPT_COMMAND.

There isn't much of a reason to pass such a strange (and quite unpleasant to properly escape) argument to her otherwise x3

Merging #16 also introduced a strangely formatted If statement that both significantly goes against the current style, but also is (in my opinion, but it is really subjective) harder to read.

So this also brings that If Statement more in-line with the rest of Shell Mommy's If Statements

ChristianSilvermoon avatar Feb 16 '23 08:02 ChristianSilvermoon