-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bashrc.env
More file actions
90 lines (80 loc) · 2.06 KB
/
Copy path.bashrc.env
File metadata and controls
90 lines (80 loc) · 2.06 KB
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
#
# .bashrc.env
#
#
## Shortcut PATHS, Shell coloring, MAC/IP-addr shortcuts.
#
###TQ-TODO: We havent sourced .bashrc.$(hostname -s) (e.g .bashrc.vimes), so $PODS isnt defined :-(
export NVR=/mnt/camstorage/nvr
export AIRTHINGS="a4:da:32:28:bd:71" # Radon SN=2930013033
export HAP=/root/repos/Ha.Plugins
export ECS="/etc/containers/systemd"
if [ -s .bashrc.$(hostname -s) ]
then
if ! grep -q "CRI_SOCKET" .bashrc.$(hostname -s)
then
logPrint red ".bashrc.$(hostname -s) should define CRI_SOCKET variable!"
else
export CRI_SOCKET=/var/run/docker.sock
export DOCKER=docker
fi
fi
export LC_TIME=C
unset FROM_HEADER
#
# History Management
#
export HISTTIMEFORMAT="{%Y} - {%a, %d %b, %H:%M} : "
# Format 62707 {2023} - {Sun, 22 Oct, 08:37} : ee .bashrc.env
export PERSISTENT_REGEXP='[[:blank:]]*[0-9]{1,6}[[:blank:]]+\{([0-9]{4,4})\} - \{([[:print:]]{18,18})\} : (.*)'
export HISTFILESIZE="-1"
export HISTSIZE="99999"
export HISTCONTROL="erasedups:ignorespace"
export PROMPT_COMMAND="history -a;log_bash_persistent_history;date +%H:%M-%a_%d"
export IGNOREEOF=1
export FIGNORE=".*~"
export PROMPT_DIRTRIM=2
#export PERSISTENT_HIST_DEBUG=YES
#export HISTIGNORE=":doneDate *"
#
## PRINT SHELL COLORS
#
DEFAULT="\e[0m"
RST="$DEFAULT"
BLACK="\e[30m"
BLINK="\e[5m"
BLUE="\e[34m"
BOLD="\e[1m"
NOTBOLD="\e[22m"
UNBOLD="\e[22m"
CYAN="\e[36m"
GREEN="\e[32m"
INVERSE="\e[7m"
REVERSE=$INVERSE
PINK="\e[35m"
RED="\e[31m"
UNDERLINE="\e[4m"
WHITE="\e[37m"
YELLOW="\e[33m"
export BOLD DEFAULT RST BLACK NOTBOLD UNBOLD RED GREEN YELLOW BLUE PINK CYAN WHITE UNDERLINE BLINK INVERSE REVERSE
export LESS="-R -M -I -F -X -x4 -q" # Useful for git if I remember correctly
# Which interop Debian/Suse/Bsd
if [[ $(whi\ch mg) =~ bin ]]
then
export EDITOR=mg
alias emacs="mg"
else
export EDITOR=emacs
fi
#
## Bash Settings Config
#
shopt -s checkwinsize
shopt -s direxpand
shopt -s expand_aliases
shopt -s histappend
shopt -s no_empty_cmd_completion
shopt -s nocasematch
shopt -u nocaseglob # DONT GLOB-MATCH case-insensitively!!
shopt -s shift_verbose
shopt -u dotglob