Skip to content

Commit 8f88171

Browse files
enable colorized prompt for Wolfi ash shells
1 parent 9b42ffb commit 8f88171

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

debian/changelog

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ byobu (6.4) unreleased; urgency=medium
22

33
* usr/lib/byobu/packages:
44
- add missing trailing whitespace
5+
* usr/bin/byobu-janitor.in:
6+
- enable colorized prompt for Wolfi ash shells
57

6-
-- Dustin Kirkland <[email protected]> Thu, 04 Jan 2024 13:31:36 -0600
8+
-- Dustin Kirkland <[email protected]> Sun, 07 Jan 2024 16:09:05 -0600
79

810
byobu (6.3) released; urgency=medium
911

usr/bin/byobu-janitor.in

+8
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ if [ -r /etc/skel/.bashrc ] && [ -r "$HOME/.bashrc" ] && [ -w "$HOME/.bashrc" ]
136136
fi
137137
[ -r "$BYOBU_CONFIG_DIR/prompt" ] || printf "[ -r ${BYOBU_PREFIX}/share/${PKG}/profiles/bashrc ] && . ${BYOBU_PREFIX}/share/${PKG}/profiles/bashrc #byobu-prompt#\n" > "$BYOBU_CONFIG_DIR/prompt"
138138

139+
# Affects: New Wolfi installs -- add colorized prompt to local .profile
140+
if [ "$BYOBU_DISTRO" = "Wolfi" ]; then
141+
# Wolfi defaults to "ash", which uses .profile
142+
if ! (grep -qs "#byobu-prompt#$" "$HOME/.profile"); then
143+
printf "[ -r $BYOBU_CONFIG_DIR/prompt ] && . $BYOBU_CONFIG_DIR/prompt #byobu-prompt#\n" >> "$HOME/.profile"
144+
fi
145+
fi
146+
139147
# Affects: Upgrades from <= byobu 5.126, clear out ec2/rcs cost statuses
140148
rm -f "$BYOBU_RUN_DIR"/cache.tmux/ec2_cost* "$BYOBU_RUN_DIR"/cache.tmux/rcs_cost* "$BYOBU_RUN_DIR"/status.tmux/ec2_cost* "$BYOBU_RUN_DIR"/status.tmux/rcs_cost*
141149

0 commit comments

Comments
 (0)