File tree 2 files changed +41
-0
lines changed
pkg/cidata/cidata.TEMPLATE.d 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -eux
3
+
4
+ if [ " ${LIMA_CIDATA_NAME} " = " default" ]; then
5
+
6
+ # Change the default shell prompt from "green" to "lime" (#BFFF00)
7
+
8
+ patch --forward -r - " /home/${LIMA_CIDATA_USER} .linux/.bashrc" << 'EOF '
9
+ @@ -37,7 +37,11 @@
10
+
11
+ # set a fancy prompt (non-color, unless we know we "want" color)
12
+ case "$TERM" in
13
+ - xterm-color|*-256color) color_prompt=yes;;
14
+ + xterm-color) color_prompt=yes;;
15
+ + *-256color) color_prompt=256;;
16
+ +esac
17
+ +case "$COLORTERM" in
18
+ + truecolor) color_prompt=true;;
19
+ esac
20
+
21
+ # uncomment for a colored prompt, if the terminal has the capability; turned
22
+ @@ -56,8 +60,12 @@
23
+ fi
24
+ fi
25
+
26
+ -if [ "$color_prompt" = yes ]; then
27
+ - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
28
+ +if [ "$color_prompt" = true ]; then
29
+ + PS1='${debian_chroot:+($debian_chroot)}\[\033[38;2;192;255;0m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
30
+ +elif [ "$color_prompt" = 256 ]; then
31
+ + PS1='${debian_chroot:+($debian_chroot)}\[\033[38;5;154m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
32
+ +elif [ "$color_prompt" = yes ]; then
33
+ + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;92m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
34
+ else
35
+ PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
36
+ fi
37
+ fi
38
+ EOF
39
+
40
+ fi
Original file line number Diff line number Diff line change
1
+ LIMA_CIDATA_NAME = {{ .Name }}
1
2
LIMA_CIDATA_USER = {{ .User }}
2
3
LIMA_CIDATA_UID = {{ .UID }}
3
4
LIMA_CIDATA_MOUNTS = {{ len .Mounts }}
You can’t perform that action at this time.
0 commit comments