colorshell: option to return to normal text-color after pressing enter

bs-ng-wizard: update ini_file to v2 (add color_shell_reset option)
fixed bug #147
parent 232df81c
......@@ -12,6 +12,11 @@ Overview of changes in v8.3 "Tweeka-Time"
* #145 (clock-advanced prompt):
fix calculating prompt-size when changing user and fix
calculating overall prompt-size in monochrome version
* #146 (nx-rc):
make "reload" working again (broken since 8.2)
* #147 (wizard):
fixed some bugs that prevented upgrading the ini-file
for bs-ng-wizard (first update of the file in v8.3)
=== new features ===
* install-extras: simple script to install other (possibly)
......@@ -20,6 +25,8 @@ Overview of changes in v8.3 "Tweeka-Time"
=== misc changes ===
* nx-rc: don't pollute environment with useless variables
* installdirs: don't create no longer used directories upon install
* colorshell: option to return to normal text-color after pressing enter
* bs-ng-wizard: update ini_file to v2 (add color_shell_reset option)
=== configure v4.2.2 ===
* add --no-postinstall configure-flag (for package-maintainers)
......
ini_version = 1
ini_version = 2
[Misc]
use_lscd = True
......@@ -8,6 +8,7 @@ dd_noerror = True
restore_directory = False
debug_verbose = False
color_shell = False
color_shell_reset = False
[Reprepro]
repo_home = ""
......
......@@ -14,6 +14,7 @@ TEXTDOMAIN="bs-ng-wizard"
source $BSNG_RC_DIR/internal/misc
source $BSNG_RC_DIR/wizard/ini
CURRENT_WIZARD=2
if [[ ! -e $HOME/.bs-ng-wizard.ini ]]; then
if [[ ! -f ${HOME}/.bs-ng-wizard.ini ]]; then
......@@ -26,19 +27,16 @@ if [[ ! -e $HOME/.bs-ng-wizard.ini ]]; then
fi
fi
elif [[ $(wizard_get ini_version) < $CURRENT_WIZARD ]]; then
bs-ng-wizard.update
STAGE=UPDATE
elif [[ $(wizard_get ini_version) == $CURRENT_WIZARD ]]; then
STAGE=KEEP
fi
MODULES=( basic cdwriter git lscd reprepro svn user )
MODULES=( basic cdwriter git lscd reprepro svn user updates )
for mod in ${MODULES[@]}; do
source $BSNG_RC_DIR/wizard/$mod
done
CURRENT_WIZARD=1
if [[ $1 == *force ]]; then
cp $BSNG_DATA_DIR/bashstyle-ng/bs-ng-wizard.ini $HOME/.bs-ng-wizard.ini
STAGE=INIT
......@@ -76,8 +74,13 @@ for mod in $CONF_MODULES ; do
wizard_svn_accounts
wizard_reprepro
wizard_user
update_wizard_2
wizard_end
;;
2 )
update_wizard_2
;;
esac
done
......@@ -144,6 +144,9 @@ if [[ $(ini_get use_bashstyle) == "True" ]]; then
if [[ $(wizard_get color_shell) == True ]]; then
. $BSNG_RC_DIR/functions/colorshell
if [[ $(wizard_get color_shell_revert) == True ]]; then
trap 'echo -ne "\e[0m"' DEBUG
fi
fi
if [[ $(ini_get tab_rotation) == "True" ]]; then \
......
#!/bin/bash
#########################################################
# #
# This is BashStyle-NG #
# #
# Licensed under GNU GENERAL PUBLIC LICENSE v3 #
# #
# Copyright 2007 - 2013 Christopher Bratusek #
# #
#########################################################
update_wizard_2 () {
whiptail --title $"BashStyle-NG $BSNG_VERSION First-Run-Wizard" --msgbox "In Version 8.3 of BashStyle-NG new questions have been added to the wizard." 12 85
# this part updates the ini file
sed -e 's/ini_version.*/ini_version = 2/g' -i $HOME/.bs-ng-wizard.ini
line=$(($(grep -wnm 1 color_shell ~/.bs-ng-wizard.ini | sed -e 's/:.*//')+1))
sed -i "${line}icolor_shell_reset = False" $HOME/.bs-ng-wizard.ini
whiptail --title $"colorshell" --yesno $"Do you want colorshell to return to default text-color when executing a command (don't recolor command output)?" 12 85
if [[ $? == "0" ]]; then
wizard_set color_shell_reset True
else wizard_set color_shell_reset False
fi
whiptail --title $"BashStyle-NG $BSNG_VERSION First-Run-Wizard" --msgbox $"You just finished updating your configuration." 12 85
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment