Skip to content

Change the default prompt color from green to lime #433

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

Merged
merged 1 commit into from
Dec 3, 2021

Conversation

afbjorklund
Copy link
Member

Closes #427

@afbjorklund afbjorklund force-pushed the shell-prompt branch 2 times, most recently from 5383eea to 4aca0e1 Compare November 24, 2021 19:48
@afbjorklund

This comment has been minimized.

@afbjorklund afbjorklund force-pushed the shell-prompt branch 2 times, most recently from 37d23e9 to 7ccfd2e Compare November 24, 2021 21:15
Only do this for the "default" linux distribution

Signed-off-by: Anders F Björklund <[email protected]>
@AkihiroSuda
Copy link
Member

AkihiroSuda commented Nov 25, 2021

Thanks, but this doesn't seem to work with the default configuration of tmux (version 3.2a)?

(Adding set-option -g default-terminal "screen-256color" to ~/.tmux.conf worked for me)

@AkihiroSuda AkihiroSuda added this to the v0.7.5 milestone Nov 25, 2021
@AkihiroSuda AkihiroSuda added the enhancement New feature or request label Nov 25, 2021
@afbjorklund
Copy link
Member Author

afbjorklund commented Nov 25, 2021

Thanks, but this doesn't seem to work with the default configuration of tmux (version 3.2a)?

Hmm, it shouldn't be any different from the previous (ubuntu) setup ? What is the tmux invocation for lima ?

Maybe related to:

# Change the default $TERM to tmux-256color
set -g default-terminal "tmux-256color"

/usr/share/doc/tmux/example_tmux.conf

That should match *-256color...

You should not get any color prompt at all when using e.g. screen https://github.com/tmux/tmux/wiki/FAQ.

Ubuntu only supports xterm-color:

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color|*-256color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

/etc/skel/.bashrc

So should be a nice monochrome ?

@AkihiroSuda
Copy link
Member

Maybe, just PS1="[LIMA] $PS1" might be fine

@afbjorklund

This comment has been minimized.

@AkihiroSuda AkihiroSuda requested a review from jandubois December 3, 2021 06:24
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

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

LGTM

I probably would have appended the new logic at the end, overwriting the default prompt when needed. That would be somewhat more robust for future Ubuntu upgrades, that might break this patch. But we can also change to that approach if/when that happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the shell prompt $PS1 distinguishable from the host shell
3 participants