|
@@ -13,14 +13,20 @@ esac
|
|
|
|
|
|
# don't put duplicate lines or lines starting with space in the history.
|
|
|
# See bash(1) for more options
|
|
|
-HISTCONTROL=ignoreboth
|
|
|
+export HISTCONTROL=ignoreboth
|
|
|
|
|
|
# append to the history file, don't overwrite it
|
|
|
shopt -s histappend
|
|
|
|
|
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
|
|
-HISTSIZE=1000
|
|
|
-HISTFILESIZE=2000
|
|
|
+export HISTSIZE=
|
|
|
+export HISTFILESIZE=
|
|
|
+export HISTTIMEFORMAT="[%F %T ] "
|
|
|
+
|
|
|
+# If you want to be extra certain, you can force bash to write the
|
|
|
+# history file every prompt
|
|
|
+# https://superuser.com/questions/20900/bash-history-loss-when-using-histappend
|
|
|
+PROMPT_COMMAND="history -a"
|
|
|
|
|
|
# check the window size after each command and, if necessary,
|
|
|
# update the values of LINES and COLUMNS.
|
|
@@ -128,6 +134,11 @@ export GOPATH=$HOME/go
|
|
|
#export GOROOT=/usr/lib/go
|
|
|
#export PATH=$PATH:$GOROOT/bin
|
|
|
|
|
|
+# Add homebrew directories to the path
|
|
|
+if [ -d /opt/homebrew/bin ]; then
|
|
|
+ export PATH=$PATH:/opt/homebrew/bin
|
|
|
+fi
|
|
|
+
|
|
|
# Add scripts directories to the path
|
|
|
if [ -d ~/scripts ]; then
|
|
|
for D in ~/scripts/*; do
|
|
@@ -189,7 +200,11 @@ function start_agent {
|
|
|
echo succeeded
|
|
|
chmod 600 "${SSH_ENV}"
|
|
|
. "${SSH_ENV}" > /dev/null
|
|
|
- /usr/bin/ssh-add;
|
|
|
+ if [[ "$OSTYPE" == "darwin21" ]]; then
|
|
|
+ /usr/bin/ssh-add --apple-load-keychain
|
|
|
+ else
|
|
|
+ /usr/bin/ssh-add
|
|
|
+ fi
|
|
|
}
|
|
|
|
|
|
# Source SSH settings, if applicable
|
|
@@ -206,7 +221,7 @@ fi
|
|
|
# Make less allow colors
|
|
|
export LESS="-R"
|
|
|
|
|
|
-eval $(thefuck --alias)
|
|
|
+[ -f /opt/homebrew/bin/thefuck ] && eval $(/opt/homebrew/bin/thefuck --alias)
|
|
|
|
|
|
# These are legacy
|
|
|
#export ANSIBLE_INVENTORY=~/ansible/ansible_hosts
|
|
@@ -274,9 +289,11 @@ export LSCOLORS="gxfxcxdxbxegedabagacad"
|
|
|
|
|
|
# Disable bell for tab completion
|
|
|
#bind 'set bell-style none'
|
|
|
-
|
|
|
export EDITOR=vim
|
|
|
|
|
|
+# Import crowdstrike-specific settings
|
|
|
+[[ -f ~/.bashrc.crowdstrike ]] && source ~/.bashrc.crowdstrike
|
|
|
+
|
|
|
echo ""
|
|
|
echo "Reminder: Use command-shift-s to save your window arrangement, command-shift-r to restore."
|
|
|
echo ""
|