add support for PS0 and EXECIGNORE (Bash 4.4 or newer)

parent bde9f1d8
......@@ -17,7 +17,7 @@ export BSNG_DATADIR=@DATADIR@
export BSNG_RCDIR=${BSNG_DATADIR}/bashstyle-ng/rc
export BSNG_VERSION=@VERSION@
export BSNG_YEAR="2007 - 2016"
INI_VERSION=26
INI_VERSION=27
source ${BSNG_RCDIR}/internal/misc
source ${BSNG_RCDIR}/internal/logging
......@@ -85,23 +85,29 @@ if [[ $(ini_get use_bashstyle) == True ]]; then
dbg_log source ${BSNG_RCDIR}/styles/null-rc
if [[ ${enable_colors} == True ]]; then
dbg_msg $"BashStyle-NG Setting:" $"PS0" $(ini_get ps0)
PS0="${ps0color} $(ini_get ps0)${fontcolor} "
dbg_msg $"BashStyle-NG Setting:" $"PS2" $(ini_get ps2)
PS2="$ps2color $(ini_get ps2)$fontcolor "
PS2="${ps2color} $(ini_get ps2)${fontcolor} "
dbg_msg $"BashStyle-NG Setting:" $"PS3" $(ini_get ps3)
PS3="$ps3color $(ini_get ps3)$fontcolor "
PS3="${ps3color} $(ini_get ps3)${fontcolor} "
dbg_msg $"BashStyle-NG Setting:" $"PS4" $(ini_get ps4)
PS4="$ps4color $(ini_get ps4)$fontcolor "
PS4="${ps4color} $(ini_get ps4)${fontcolor} "
else
dbg_msg $"BashStyle-NG Setting:" $"PS0" $(ini_get ps0)
PS0=" $(ini_get ps0) "
dbg_msg $"BashStyle-NG Setting:" $"PS2" $(ini_get ps2)
PS2="$(ini_get ps2) "
PS2=" $(ini_get ps2) "
dbg_msg $"BashStyle-NG Setting:" $"PS3" $(ini_get ps3)
PS3="$(ini_get ps3) "
PS3=" $(ini_get ps3) "
dbg_msg $"BashStyle-NG Setting:" $"PS4" $(ini_get ps4)
PS4="$(ini_get ps4) "
PS4=" $(ini_get ps4) "
fi
if [[ $(ini_get random_style) == True ]]; then
......
......@@ -138,6 +138,7 @@ eval fontcolor=$(ini_get color_font)
eval sepacolor=$(ini_get color_separator)
eval upcolor=$(ini_get color_uptime)
eval pscolor=$(ini_get color_ps)
eval ps0color=$(ini_get color_ps0)
eval ps2color=$(ini_get color_ps2)
eval ps3color=$(ini_get color_ps3)
eval ps4color=$(ini_get color_ps4)
......@@ -151,6 +152,7 @@ efontcolor=$(echo ${fontcolor} | sed -e 's/\\\[//g;s/\\\]//g')
esepacolor=$(echo ${sepacolor} | sed -e 's/\\\[//g;s/\\\]//g')
eupcolor=$(echo ${upcolor} | sed -e 's/\\\[//g;s/\\\]//g')
epscolor=$(echo ${pscolor} | sed -e 's/\\\[//g;s/\\\]//g')
eps0color=$(echo ${ps0color} | sed -e 's/\\\[//g;s/\\\]//g')
eps2color=$(echo ${ps2color} | sed -e 's/\\\[//g;s/\\\]//g')
eps3color=$(echo ${ps3color} | sed -e 's/\\\[//g;s/\\\]//g')
eps4color=$(echo ${ps4color} | sed -e 's/\\\[//g;s/\\\]//g')
......@@ -21,6 +21,9 @@ dbg_msg $"BashStyle-NG Setting:" $"HISTIGNORE" "$HISTIGNORE"
dbg_log export FIGNORE="$(ini_get completion_ignore)"
dbg_msg $"BashStyle-NG Setting:" $"FIGNORE" "$FIGNORE"
dbg_log export EXECIGNORE="$(ini_get exec_ignore)"
dbg_msg $"BashStyle-NG Setting:" $"EXECIGNORE" "$EXECIGNORE"
dbg_log export CDPATH=$(ini_get cdpath)
dbg_msg $"BashStyle-NG Setting:" $"CDPATH" "$CDPATH"
......
......@@ -2475,6 +2475,90 @@
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label19">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Color for PS0</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">36</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="color_ps0">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="model">style.liststore.grep_colour</property>
<child>
<object class="GtkCellRendererText" id="style.cellrenderer.grep_colour20"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">37</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="advanced.label.ps0">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">PS0</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">36</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ps0">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="invisible_char"></property>
<property name="primary_icon_name">gtk-revert-to-saved</property>
<property name="secondary_icon_name">gtk-delete</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">37</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator26">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">3</property>
<property name="margin_bottom">3</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">35</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="style.label.bash44">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">4.4+</property>
<property name="angle">90</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">36</property>
<property name="height">2</property>
</packing>
</child>
<child>
<placeholder/>
</child>
......@@ -3305,6 +3389,7 @@
<packing>
<property name="left_attach">2</property>
<property name="top_attach">13</property>
<property name="height">2</property>
</packing>
</child>
<child>
......@@ -3338,6 +3423,62 @@
<property name="top_attach">6</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="separator27">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">4</property>
<property name="margin_bottom">4</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">22</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="advanced.label.bash44">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">4.4+</property>
<property name="angle">90</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">23</property>
<property name="height">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="advanced.label.execignore">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Exec Blacklist</property>
<property name="angle">0.02</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">23</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="execignore">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="primary_icon_name">gtk-revert-to-saved</property>
<property name="secondary_icon_name">gtk-delete</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">24</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
......
......@@ -80,6 +80,7 @@ class BashStyleNG(object):
WidgetHandler.InitWidget("color_font", "Style", "color_font", "combo", dicts.colors)
WidgetHandler.InitWidget("color_host", "Style", "color_host", "combo", dicts.colors)
WidgetHandler.InitWidget("color_ps", "Style", "color_ps", "combo", dicts.colors)
WidgetHandler.InitWidget("color_ps0", "Style", "color_ps0", "combo", dicts.colors)
WidgetHandler.InitWidget("color_ps2", "Style", "color_ps2", "combo", dicts.colors)
WidgetHandler.InitWidget("color_ps3", "Style", "color_ps3", "combo", dicts.colors)
WidgetHandler.InitWidget("color_ps4", "Style", "color_ps4", "combo", dicts.colors)
......@@ -113,6 +114,7 @@ class BashStyleNG(object):
####################### Advanced Stuff #############################################
WidgetHandler.InitWidget("history_blacklist", "Advanced", "history_ignore", "text", None)
WidgetHandler.InitWidget("separator", "Advanced", "separator", "text", None)
WidgetHandler.InitWidget("ps0", "Advanced", "ps0", "text", None)
WidgetHandler.InitWidget("ps2", "Advanced", "ps2", "text", None)
WidgetHandler.InitWidget("ps3", "Advanced", "ps3", "text", None)
WidgetHandler.InitWidget("ps4", "Advanced", "ps4", "text", None)
......@@ -138,6 +140,7 @@ class BashStyleNG(object):
WidgetHandler.InitWidget("dd_progress", "Advanced", "dd_progress", "bool", None)
WidgetHandler.InitWidget("restore_pwd", "Advanced", "restore_directory", "bool", None)
WidgetHandler.InitWidget("debug_verbose", "Advanced", "debug_verbose", "bool", None)
WidgetHandler.InitWidget("execignore", "Advanced", "exec_ignore", "text", None)
WidgetHandler.InitWidget("globignore", "Advanced", "glob_ignore", "text", None)
WidgetHandler.InitWidget("history_sync", "Advanced", "history_sync", "bool", None)
......
......@@ -31,7 +31,7 @@ FACTORY_DEFAULTS = (DATADIR + '/bashstyle-ng/bs-ng.ini')
VENDOR_DEFAULTS = ('/etc/bs-ng_vendor.ini')
NXRC = (DATADIR + "/bashstyle-ng/rc/nx-rc")
app_ini_version = 26
app_ini_version = 27
class Config(object):
def InitConfig(self):
......
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