Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PS1 so that bash new lines work consistently #11

Merged
merged 1 commit into from
Dec 23, 2020

Conversation

karthikperu7
Copy link
Contributor

This has been bugging me ever since I started using ocm-container.

When you are in a container (bash) session, if your commands are really long, to the point that it extends more than the width of the current line, then bash starts overwriting your current line instead of starting in a new line.

Similar to this issue in stack overflow .

The fix is to have the colour code to start and end with \[ and \] so that bash does not count that towards the number of characters before it starts a new line.

I tried to fix it with keeping the bash function but in the end this is what I came up with, which works.

Hope this makes sense!

@georgettica
Copy link
Contributor

tested and it seems to work.
/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 23, 2020
@drewandersonnz drewandersonnz merged commit 39216b8 into openshift:master Dec 23, 2020
clcollins referenced this pull request in clcollins/ocm-container Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants