Skip to content

Commit efa2c68

Browse files
committed
Change prompt color from lime to lime green
This makes it more legible with light backgrounds, and changes the fallback color from "light green" back to regular "green". Signed-off-by: Anders F Björklund <[email protected]>
1 parent f7b176a commit efa2c68

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

pkg/cidata/cidata.TEMPLATE.d/boot/08-shell-prompt.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if [ "${LIMA_CIDATA_NAME}" = "default" ] && command -v patch >/dev/null 2>&1 &&
77

88
! grep -q "^# Lima PS1" "${LIMA_CIDATA_HOME}/.bashrc" || exit 0
99

10-
# Change the default shell prompt from "green" to "lime" (#BFFF00)
10+
# Change the default shell prompt from "green" to "lime green" (#32CD32)
1111

1212
patch --forward -r - "${LIMA_CIDATA_HOME}/.bashrc" <<'EOF'
1313
@@ -37,7 +37,11 @@
@@ -23,23 +23,20 @@ if [ "${LIMA_CIDATA_NAME}" = "default" ] && command -v patch >/dev/null 2>&1 &&
2323
esac
2424
2525
# uncomment for a colored prompt, if the terminal has the capability; turned
26-
@@ -56,8 +60,13 @@
26+
@@ -56,7 +60,12 @@
2727
fi
2828
fi
2929
3030
-if [ "$color_prompt" = yes ]; then
31-
- PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
32-
+# Lima PS1: set color to lime
31+
+# Lima PS1: set color to lime green
3332
+if [ "$color_prompt" = true ]; then
34-
+ PS1='${debian_chroot:+($debian_chroot)}\[\033[38;2;192;255;0m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
33+
+ PS1='${debian_chroot:+($debian_chroot)}\[\033[38;2;50;205;50m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
3534
+elif [ "$color_prompt" = 256 ]; then
36-
+ PS1='${debian_chroot:+($debian_chroot)}\[\033[38;5;154m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
35+
+ PS1='${debian_chroot:+($debian_chroot)}\[\033[38;5;77m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
3736
+elif [ "$color_prompt" = yes ]; then
38-
+ PS1='${debian_chroot:+($debian_chroot)}\[\033[01;92m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
37+
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
3938
else
4039
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
41-
fi
42-
fi
4340
EOF
4441

4542
fi

0 commit comments

Comments
 (0)