diff --git a/debian/changelog b/debian/changelog index 930f4fc7..fd5a9c71 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,9 @@ byobu (5.31) unreleased; urgency=low - use env for shebang in development tree - fix this up in the postinst + seems racy -- there's got to better way of handling this??? + * usr/bin/byobu-launcher-install, usr/bin/byobu-launcher-uninstall: + - LP: #1002137 + - support fish shell in the installer -- Dustin Kirkland Mon, 28 Jan 2013 02:21:15 -0600 diff --git a/usr/bin/byobu-launcher-install b/usr/bin/byobu-launcher-install index 38542c02..69561e66 100755 --- a/usr/bin/byobu-launcher-install +++ b/usr/bin/byobu-launcher-install @@ -47,6 +47,11 @@ install_launcher() { printf "_byobu_sourced=1 . ${BYOBU_PREFIX}/bin/byobu-launch\n" >> "$1" } +install_launcher_fish() { + $PKG-launcher-uninstall "$1" || true + printf "[ -z \"\$DISPLAY\" -a -z \"\$BYOBU_WINDOWS\" ] ; and [ \"\$TERM\" != \"dumb\" ] ; and exec byobu-launcher" >> "$1" +} + # Sanitize the environment $PKG-launcher-uninstall || true @@ -70,6 +75,11 @@ case "$SHELL" in ;; esac +# Handle fish shell +if [ -d "$HOME/.config/fish" ]; then + install_launcher_fish "$HOME/.config/fish/config.fish" +fi + # Hush login, since we will handle motd printing touch "$HOME"/.hushlogin rm -f "$BYOBU_CONFIG_DIR/disable-autolaunch" diff --git a/usr/bin/byobu-launcher-uninstall b/usr/bin/byobu-launcher-uninstall index 8e51e053..9f4b2216 100755 --- a/usr/bin/byobu-launcher-uninstall +++ b/usr/bin/byobu-launcher-uninstall @@ -27,14 +27,14 @@ remove_launcher() { dest=$1 if [ -w "$dest" ]; then # keep any comments, and remove lines invoking byobu: - $BYOBU_SED -i -e '/^\s*#/n' -e "/\b$PKG-launch\$/d" -e "/ screen-launch/d" "$dest" + $BYOBU_SED -i -e '/^\s*#/n' -e "/\b$PKG-launch\$/d" -e "/ screen-launch/d" "$dest" -e "/byobu-launcher$/d" fi } if [ -f "$1" ]; then remove_launcher "$1" else - for i in ".profile" ".bashrc" ".bash_profile" ".bash_login" ".zprofile"; do + for i in ".profile" ".bashrc" ".bash_profile" ".bash_login" ".zprofile" ".config/fish/config.fish"; do remove_launcher "$HOME/$i" done fi