Skip to content

Conversation

@DRSDavidSoft
Copy link

Signed-off-by: David Refoua [email protected]

This commit removes the annoying double space in the first line of PS1 when MSYSTEM is not set.

@DRSDavidSoft
Copy link
Author

CI is failing a sha256sum checksum

Comment on lines +16 to +20
if [ ! -z "$MSYSTEM" ]
then
PS1="$PS1"'\[\033[35m\]' # change to purple
PS1="$PS1"'$MSYSTEM ' # show MSYSTEM
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I suspect that the use case is broken (because MSYSTEM should always be set), I am open to getting convinced that it makes sense.

But a terse "remove annoying space when MSYSTEM not set" does not even begin to convince anyone.

In other words, this change needs a substantially improved commit message, one in accordance to https://github.blog/2022-06-30-write-better-commits-build-better-projects/.

After that is done, a better way to implement this is:

Suggested change
if [ ! -z "$MSYSTEM" ]
then
PS1="$PS1"'\[\033[35m\]' # change to purple
PS1="$PS1"'$MSYSTEM ' # show MSYSTEM
fi
PS1="$PS1${MSYSTEM:+\[\033[35m\]$MSYSTEM }" # show MSYSTEM in purple (if set)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change needs a substantially improved commit message

@DRSDavidSoft are you working on this?

@dscho
Copy link
Member

dscho commented Feb 21, 2023

While I suspect that the use case is broken (because MSYSTEM should always be set), I am open to getting convinced that it makes sense.

This PR has not seen any attempt to motivate the change in the past 3 weeks, therefore I'll close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants