enable colorized prompt for Wolfi ash shells

This commit is contained in:
Dustin Kirkland 2024-01-07 16:09:26 -06:00
parent 9b42ffb922
commit 8f88171a6d
2 changed files with 11 additions and 1 deletions

4
debian/changelog vendored
View file

@ -2,8 +2,10 @@ byobu (6.4) unreleased; urgency=medium
* usr/lib/byobu/packages:
- add missing trailing whitespace
* usr/bin/byobu-janitor.in:
- enable colorized prompt for Wolfi ash shells
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 04 Jan 2024 13:31:36 -0600
-- Dustin Kirkland <kirkland@ubuntu.com> Sun, 07 Jan 2024 16:09:05 -0600
byobu (6.3) released; urgency=medium

View file

@ -136,6 +136,14 @@ if [ -r /etc/skel/.bashrc ] && [ -r "$HOME/.bashrc" ] && [ -w "$HOME/.bashrc" ]
fi
[ -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"
# Affects: New Wolfi installs -- add colorized prompt to local .profile
if [ "$BYOBU_DISTRO" = "Wolfi" ]; then
# Wolfi defaults to "ash", which uses .profile
if ! (grep -qs "#byobu-prompt#$" "$HOME/.profile"); then
printf "[ -r $BYOBU_CONFIG_DIR/prompt ] && . $BYOBU_CONFIG_DIR/prompt #byobu-prompt#\n" >> "$HOME/.profile"
fi
fi
# Affects: Upgrades from <= byobu 5.126, clear out ec2/rcs cost statuses
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*