* usr/bin/byobu-disable-prompt, usr/bin/byobu-enable-prompt,

usr/share/byobu/profiles/bashrc:
  - don't put profile reloads in the bash history
  - use a ~/.byobu/prompt file as a redirect, and to enable
    end user customizations
  - fix a bash error
This commit is contained in:
Dustin Kirkland 2013-08-03 15:03:37 -05:00
commit 1fc076ac82
4 changed files with 12 additions and 4 deletions

6
debian/changelog vendored
View file

@ -7,6 +7,12 @@ byobu (5.51) unreleased; urgency=low
- use a common bashrc file
* usr/share/byobu/profiles/bashrc:
- allow override via a $DISTRO env variable
* usr/bin/byobu-disable-prompt, usr/bin/byobu-enable-prompt,
usr/share/byobu/profiles/bashrc:
- don't put profile reloads in the bash history
- use a ~/.byobu/prompt file as a redirect, and to enable
end user customizations
- fix a bash error
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 02 Aug 2013 17:30:11 -0500

View file

@ -26,7 +26,7 @@ $BYOBU_SED -i -e "/#byobu-prompt#$/d" "$HOME/.bashrc"
if [ "$1" != "--no-reload" ]; then
if [ -n "$TMUX" ] && [ "$SHELL" = "/bin/bash" ]; then
tmux send-keys ". ~/.bashrc" \; send-keys Enter
tmux send-keys " . ~/.bashrc" \; send-keys Enter
else
echo
echo "You will need to reload your shell configuration for this to take effect..."

View file

@ -25,11 +25,13 @@ PKG="byobu"
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
prompt="${BYOBU_CONFIG_DIR}/prompt"
[ -e "$prompt" ] || printf ". ${BYOBU_PREFIX}/share/${PKG}/profiles/bashrc #byobu-prompt#\n" > "$prompt"
$PKG-disable-prompt --no-reload "$1" || true
printf ". ${BYOBU_PREFIX}/share/${PKG}/profiles/bashrc #byobu-prompt#\n" >> "$HOME/.bashrc"
printf "[ -r $prompt ] && . $prompt #byobu-prompt#\n" >> "$HOME/.bashrc"
if [ -n "$TMUX" ]; then
tmux send-keys ". ~/.bashrc" \; send-keys Enter
tmux send-keys " . ~/.bashrc" \; send-keys Enter
else
echo
echo "You will need to reload your shell configuration for this to take effect..."

View file

@ -19,7 +19,7 @@
if [ -n "$TMUX" ] || (printf "$TERMCAP" | grep -qs "screen"); then
# Ensure that we're in bash, in a byobu environment
if [ -n "$BYOBU_BACKEND" ] && [ "$SHELL" = "/bin/bash" ]; then
if [-z "$DISTRO" ] && grep -qs "^Ubuntu" /etc/issue; then
if [ -z "$DISTRO" ] && grep -qs "^Ubuntu" /etc/issue; then
# Use Ubuntu colors (grey / aubergine / orange)
PS1="${debian_chroot:+($debian_chroot)}\[\e[38;5;245m\]\u\[\e[00m\]@\[\e[38;5;5m\]\h\[\e[00m\]:\[\e[38;5;172m\]\w\[\e[00m\]❭ "
else