aboutsummaryrefslogtreecommitdiffstats
path: root/assets/shell.bash
diff options
context:
space:
mode:
authorduckyriley <[email protected]>2026-11-23 20:45:44 +0800
committerduckyriley <[email protected]>2026-11-23 20:45:44 +0800
commit24d7f554d00901841810b856b44d5763cbc5bd76 (patch)
tree740eb685f70937a014a6c5e5a7fa09b51f19bac0 /assets/shell.bash
downloadducky-24d7f554d00901841810b856b44d5763cbc5bd76.tar.gz
ducky-24d7f554d00901841810b856b44d5763cbc5bd76.zip
Build native GPUI shell with Lua customization and riced defaults
Diffstat (limited to 'assets/shell.bash')
-rw-r--r--assets/shell.bash18
1 files changed, 18 insertions, 0 deletions
diff --git a/assets/shell.bash b/assets/shell.bash
new file mode 100644
index 0000000..d36d1e5
--- /dev/null
+++ b/assets/shell.bash
@@ -0,0 +1,18 @@
+# User configuration first; this prompt is scoped to Ducky.
+[[ -f ~/.bashrc ]] && source ~/.bashrc
+_ducky_prompt() {
+ local status=$? branch
+ branch=$(git symbolic-ref --quiet --short HEAD 2>/dev/null) || branch=''
+ PS1=$'\n\[\e[38;2;196;167;231m\]╭─ '
+ PS1+='\[\e[38;2;222;215;232m\]\w'
+ _ducky_branch=$branch
+ [[ -n $branch ]] && PS1+=' \[\e[38;2;151;213;207m\]⎇ ${_ducky_branch}'
+ [[ $status -ne 0 ]] && PS1+=" \[\e[38;2;235;139;156m\]${status}"
+ PS1+=$'\n\[\e[38;2;196;167;231m\]╰─❯ \[\e[0m\]'
+}
+# Keep other prompt hooks, then set Ducky's prompt last.
+if declare -p PROMPT_COMMAND 2>/dev/null | grep -q 'declare -a'; then
+ PROMPT_COMMAND+=(_ducky_prompt)
+else
+ PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND; }_ducky_prompt"
+fi