From cc3269bf21110f8567a867b5e565565a7cebe998 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Fri, 26 Jul 2013 16:25:48 -0500 Subject: [PATCH] * usr/bin/byobu-disable-color-prompt, usr/bin/byobu-enable-color- prompt, usr/bin/Makefile.am, usr/share/byobu/profiles/ps1.sh, usr/share/man/man1/byobu-disable-color-prompt.1, usr/share/man/man1/byobu-enable-color-prompt.1, usr/share/man/man1/Makefile.am: - add a utility that installs and uninstalls a nicer color prompt into the local shell configuration --- debian/changelog | 7 ++++ usr/bin/Makefile.am | 2 +- usr/bin/byobu-disable-color-prompt | 27 ++++++++++++++ usr/bin/byobu-enable-color-prompt | 35 +++++++++++++++++++ usr/share/byobu/profiles/ps1.sh | 1 + usr/share/man/man1/Makefile.am | 2 +- .../man/man1/byobu-disable-color-prompt.1 | 1 + .../man/man1/byobu-enable-color-prompt.1 | 30 ++++++++++++++++ 8 files changed, 103 insertions(+), 2 deletions(-) create mode 100755 usr/bin/byobu-disable-color-prompt create mode 100755 usr/bin/byobu-enable-color-prompt create mode 100644 usr/share/byobu/profiles/ps1.sh create mode 100644 usr/share/man/man1/byobu-disable-color-prompt.1 create mode 100644 usr/share/man/man1/byobu-enable-color-prompt.1 diff --git a/debian/changelog b/debian/changelog index a63a62f3..a5101ba4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,13 @@ byobu (5.48) unreleased; urgency=low * usr/lib/byobu/include/shutil: - drop "bright" designations, which don't seem to be working properly most places + * usr/bin/byobu-disable-color-prompt, usr/bin/byobu-enable-color- + prompt, usr/bin/Makefile.am, usr/share/byobu/profiles/ps1.sh, + usr/share/man/man1/byobu-disable-color-prompt.1, + usr/share/man/man1/byobu-enable-color-prompt.1, + usr/share/man/man1/Makefile.am: + - add a utility that installs and uninstalls a nicer color prompt + into the local shell configuration -- Dustin Kirkland Wed, 17 Jul 2013 09:37:02 -0500 diff --git a/usr/bin/Makefile.am b/usr/bin/Makefile.am index 40cc3366..e0b07cb8 100644 --- a/usr/bin/Makefile.am +++ b/usr/bin/Makefile.am @@ -1,4 +1,4 @@ -bin_SCRIPTS = byobu byobu-config byobu-ctrl-a byobu-disable byobu-enable byobu-export byobu-janitor byobu-keybindings byobu-launch byobu-launcher byobu-launcher-install byobu-launcher-uninstall byobu-layout byobu-quiet byobu-reconnect-sockets byobu-select-backend byobu-select-profile byobu-select-session byobu-silent byobu-status byobu-status-detail byobu-shell byobu-ugraph byobu-ulevel +bin_SCRIPTS = byobu byobu-config byobu-ctrl-a byobu-disable byobu-disable-color-prompt byobu-enable byobu-enable-color-prompt byobu-export byobu-janitor byobu-keybindings byobu-launch byobu-launcher byobu-launcher-install byobu-launcher-uninstall byobu-layout byobu-quiet byobu-reconnect-sockets byobu-select-backend byobu-select-profile byobu-select-session byobu-silent byobu-status byobu-status-detail byobu-shell byobu-ugraph byobu-ulevel install-exec-hook: cd $(DESTDIR)$(bindir) && rm -f byobu-screen && $(LN_S) byobu byobu-screen diff --git a/usr/bin/byobu-disable-color-prompt b/usr/bin/byobu-disable-color-prompt new file mode 100755 index 00000000..0b84d3c7 --- /dev/null +++ b/usr/bin/byobu-disable-color-prompt @@ -0,0 +1,27 @@ +#!/bin/sh -e +# +# byobu-disable-color-prompt +# Copyright (C) 2013 Dustin Kirkland +# +# Authors: Dustin Kirkland +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +PKG="byobu" +[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc" +[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX +. "${BYOBU_PREFIX}/lib/${PKG}/include/common" + +$BYOBU_SED -i -e "/^PS1=.*#byobu-color-prompt#$/d" "$HOME/.bashrc" + +# vi: syntax=sh ts=4 noexpandtab diff --git a/usr/bin/byobu-enable-color-prompt b/usr/bin/byobu-enable-color-prompt new file mode 100755 index 00000000..f8fc701b --- /dev/null +++ b/usr/bin/byobu-enable-color-prompt @@ -0,0 +1,35 @@ +#!/bin/sh -e +# +# byobu-enable-color-prompt +# Copyright (C) 2013 Dustin Kirkland +# +# Authors: Dustin Kirkland +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +PKG="byobu" +[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc" +[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX +. "${BYOBU_PREFIX}/lib/${PKG}/include/common" + +byobu-disable-color-prompt || true +cat >>"$HOME/.bashrc" < for Ubuntu systems (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 published by the Free Software Foundation. + +The complete text of the GNU General Public License can be found in \fI/usr/share/common-licenses/GPL\fP on Debian/Ubuntu systems, or in \fI/usr/share/doc/fedora-release-*/GPL\fP on Fedora systems, or on the web at \fIhttp://www.gnu.org/licenses/gpl.txt\fP.