* 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
This commit is contained in:
Dustin Kirkland 2013-07-26 16:25:48 -05:00
parent 18467d4dfe
commit cc3269bf21
8 changed files with 103 additions and 2 deletions

7
debian/changelog vendored
View file

@ -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 <kirkland@ubuntu.com> Wed, 17 Jul 2013 09:37:02 -0500

View file

@ -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

View file

@ -0,0 +1,27 @@
#!/bin/sh -e
#
# byobu-disable-color-prompt
# Copyright (C) 2013 Dustin Kirkland
#
# Authors: Dustin Kirkland <kirkland@byobu.co>
#
# 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 <http://www.gnu.org/licenses/>.
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

View file

@ -0,0 +1,35 @@
#!/bin/sh -e
#
# byobu-enable-color-prompt
# Copyright (C) 2013 Dustin Kirkland
#
# Authors: Dustin Kirkland <kirkland@byobu.co>
#
# 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 <http://www.gnu.org/licenses/>.
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" <<EOF
PS1="${debian_chroot:+($debian_chroot)}\[\e[00;31m\]\u\[\e[00;30m\]@\[\e[00;36m\]\h\[\e[00m\]:\[\e[00;32m\]\w\[\e[00m\]\$ " #byobu-color-prompt#
EOF
echo
echo "You will need to reload your shell configuration for this to take effect..."
echo " . ~/.bashrc"
echo
# vi: syntax=sh ts=4 noexpandtab

View file

@ -0,0 +1 @@
export PS1="${debian_chroot:+($debian_chroot)}\[\e[00;31m\]\u\[\e[00;30m\]@\[\e[00;36m\]\h\[\e[00m\]:\[\e[00;32m\]\w\[\e[00m\]\$ "

View file

@ -1 +1 @@
man_MANS = byobu.1 byobu-config.1 byobu-ctrl-a.1 byobu-disable.1 byobu-enable.1 byobu-export.1 byobu-janitor.1 byobu-keybindings.1 byobu-launch.1 byobu-launcher.1 byobu-launcher-install.1 byobu-launcher-uninstall.1 byobu-layout.1 byobu-quiet.1 byobu-reconnect-sockets.1 byobu-screen.1 byobu-select-backend.1 byobu-select-profile.1 byobu-select-session.1 byobu-shell.1 byobu-silent.1 byobu-status.1 byobu-status-detail.1 byobu-tmux.1
man_MANS = byobu.1 byobu-config.1 byobu-ctrl-a.1 byobu-disable.1 byobu-disable-color-prompt.1 byobu-enable.1 byobu-enable-color-prompt.1 byobu-export.1 byobu-janitor.1 byobu-keybindings.1 byobu-launch.1 byobu-launcher.1 byobu-launcher-install.1 byobu-launcher-uninstall.1 byobu-layout.1 byobu-quiet.1 byobu-reconnect-sockets.1 byobu-screen.1 byobu-select-backend.1 byobu-select-profile.1 byobu-select-session.1 byobu-shell.1 byobu-silent.1 byobu-status.1 byobu-status-detail.1 byobu-tmux.1

View file

@ -0,0 +1 @@
.so man1/byobu-enable-color-prompt.1

View file

@ -0,0 +1,30 @@
.TH byobu-enable-color-prompt 1 "26 July 2013" byobu "byobu"
.SH NAME
byobu-enable-color-prompt, byobu-disable-color-prompt \- add and remove a nice color prompt to your shell configuration
.SH SYNOPSIS
\fBbyobu-enable-color-prompt\fP
.TP
\fBbyobu-disable-color-prompt\fP
.SH DESCRIPTION
\fBbyobu-enable-color-prompt\fP will add one line to your \fI~/.bashrc\fP.
\fBbyobu-disable-color-prompt\fP will remove its color configuration from \fI~/.bashrc\fP.
.SH "BUGS"
This is currently only compatible with \fBbash(1)\fP.
.SH SEE ALSO
.PD 0
.TP
\fBbash\fP(1)
.TP
\fBhttp://byobu.co\fP
.PD
.SH AUTHOR
This manpage and the utility were written by Dustin Kirkland <kirkland@byobu.co> 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.