dugout-> program_enhance_shell.dugout
Provide shell behavior and enhancements: Provides Bash variables for compatibility, but other shell-related configurations may also be included.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/bin/sh
###############################################################################
## COPYRIGHT (C) 2020-2026 NEW ENTITY OPERATIONS INC. ALL RIGHTS RESERVED
## INSTANCE: program_enhance_shell.dugout
## MODIFIED: 2026/04/20
## OVERVIEW: Preset Shell behavior and enhancements: Provides Bash variables
## for compatibility but other shell-related configurations may also be
## included.
##
## program_enhance_shell is used to enhance the customization-level of default
## bash (and other shell types) and give the operator a much deeper set of
## interface activity options
###############################################################################
## stateful logic: Environment
###############################################################################
## bash specific modifiers: 1 = on, 0 = off
export BASH_HISTCONTROL_NOLOG="$CONFIGURATION_BASH_HISTCONTROL_NOLOG"
export BASH_HISTCONTROL_ERASEDUPS="$CONFIGURATION_BASH_HISTCONTROL_ERASEDUPS"
export BASH_HISTCONTROL_GHOST="$CONFIGURATION_BASH_HISTCONTROL_GHOST"
export BASH_HISTCONTROL_IGNOREDUPS="$CONFIGURATION_BASH_HISTCONTROL_IGNOREDUPS"
export BASH_HISTCONTROL_IGNORESPACE="$CONFIGURATION_BASH_HISTCONTROL_IGNORESPACE"
export BASH_HISTCONTROL_IGNOREBOTH="$CONFIGURATION_BASH_HISTCONTROL_IGNOREBOTH"
export BASH_HISTCONTROL_IGNORESPACEANDERASEDUPS="$CONFIGURATION_BASH_HISTCONTROL_IGNORESPACEANDERASEDUPS"
export BASH_NOCLOBBER="$CONFIGURATION_BASH_NOCLOBBER"
export BASH_ZAP_SHELL="$CONFIGURATION_BASH_ZAP_SHELL"
## user-defined int logic
export BASH_ZAP_SHELL_IGNOREEOF="$CONFIGURATION_BASH_ZAP_SHELL_IGNOREEOF"
## not portable
#export BASH_PERSISTENT_WINDOW_CHECKING="$CONFIGURATION_BASH_PERSISTENT_WINDOW_CHECKING"
#export BASH_NAVIGATION_CONTROL_AUTO_PATH="$CONFIGURATION_BASH_NAVIGATION_CONTROL_AUTO_PATH"
###############################################################################
## Log congrol
###############################################################################
## These should be tested in isolation before production implementation
if [ "$BASH_HISTCONTROL_NOLOG" -eq 1 ]; then
export HISTSIZE=0
else
:
fi
if [ "$BASH_HISTCONTROL_GHOST" -eq 1 ]; then
export HISTSIZE=0
else
:
fi
###############################################################################
## History control
###############################################################################
if [ "$BASH_HISTCONTROL_ERASEDUPS" -eq 1 ]; then
export HISTCONTROL='erasedups'
else
:
fi
if [ "$BASH_HISTCONTROL_IGNOREDUPS" -eq 1 ]; then
export HISTCONTROL='ignoredups' ;
else
:
fi
if [ "$BASH_HISTCONTROL_IGNORESPACE" -eq 1 ]; then
export HISTCONTROL='ignorespace' ;
else
:
fi
if [ "$BASH_HISTCONTROL_IGNOREBOTH" -eq 1 ]; then
export HISTCONTROL='ignoreboth' ;
else
:
fi
if [ "$BASH_HISTCONTROL_IGNORESPACEANDERASEDUPS" -eq 1 ]; then
export HISTCONTROL='erasedups':'ignorespace' ;
else
:
fi
###############################################################################
## Paths: Not portable, removed
###############################################################################
#if [ "$BASH_NAVIGATION_CONTROL_AUTO_PATH" -eq 1 ]; then
# shopt -s autocd ;
#else
# :
#fi
###############################################################################
## Clobber control
###############################################################################
if [ "$BASH_NOCLOBBER" -eq 1 ]; then
set -o noclobber ;
else
:
fi
###############################################################################
## PWC for size requirements: Not portable, removed
###############################################################################
#if [ "$BASH_PERSISTENT_WINDOW_CHECKING" -eq 1 ]; then
# shopt -s checkwinsize ;
#else
# :
#fi
###############################################################################
## Zap the shell
###############################################################################
if [ "$BASH_ZAP_SHELL" -eq 1 ]; then
export IGNOREEOF="$BASH_ZAP_SHELL_IGNOREEOF"
else
:
fi