-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbashrc
More file actions
112 lines (85 loc) · 3.87 KB
/
bashrc
File metadata and controls
112 lines (85 loc) · 3.87 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# This file is for things I normally add to .bashrc, but want to move under source control.
# -----COPY this code to ~/.bashrc-----
# Set the PATH to include user's bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# (commented out in this file to prevent infinite loop)
# When ~/bin/bashrc exists and is readable, source it
# if [ -r "${HOME}/bin/bashrc" ]; then
# source "${HOME}/bin/bashrc"
# fi
# -----END COPY------
# There might be scripts or alias in this repository that depend on these env vars.
# Define these secrets in ~/.bashrc so that don't show up in source control.
#
# export SSF_NEXUS_HOST=
# export SSF_NEXUS_USER=
# export SSF_NEXUS_TOKEN=
# export GITLAB_HOST=
# export GITLAB_USER=
# export GITLAB_TOKEN=
# export SSF_GITLAB_HOST=
# export SSF_GITLAB_USER=
# Log into registries and such
#docker login "$GITLAB_HOST" -u $GITLAB_USER -p "$GITLAB_TOKEN"
#helm registry login $SSF_NEXUS_HOST -u $export SSF_NEXUS_USER -p "$SSF_NEXUS_TOKEN"
# ----------------------------------------------------------------------------------------------------------
# Setup history so that commands from all open shells get written to one history log
export HISTCONTROL=ignoredups
shopt -s histappend
HISTSIZE=50
HISTFILESIZE=20000
# Append history lines immediately
PROMPT_COMMAND='history -a; history -n; '"${PROMPT_COMMAND:-:}"
export PROMPT_COMMAND
# ----------------------------------------------------------------------------------------------------------
alias pickjava='source $HOME/bin/pickjava' #no subshell so it can source a file
alias install-node='source $HOME/bin/install-node' #no subshell so it can source a file
alias ll='ls -alh'
alias k='kubectl'
alias pickjava='. $HOME/bin/pickjava'
alias sourceb='source ~/.bashrc'
alias helmlogin='helm registry login $SSF_NEXUS_HOST --username $SSF_NEXUS_USER --password $SSF_NEXUS_TOKEN'
alias sourceb='source ~/.bashrc'
alias k3stop='sudo systemctl stop k3s && dstop'
alias k3go='sudo systemctl start k3s'
alias yfmt='yq -P -I 2 --no-doc .'
alias jpick='. pickjava'
# ----------------------------------------------------------------------------------------------------------
# ----- EXPORT VARS HERE -----
# Fix for SSHing from kitty terminal
export TERM=xterm-256color
export KUBECONFIG=~/.kube/config
export YAMLLINT_CONFIG_FILE=$HOME/bin/.yamllint
export VIMINIT='source $HOME/bin/.vimrc'
# Set path to Container Network Interface
export CNI_PATH=~/.local/libexec/cni
#export DOCKER_BUILDKIT=0
# Claude Code - reduce token usage for longer conversations
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=16000
export MAX_THINKING_TOKENS=5000
export BASH_MAX_OUTPUT_LENGTH=4000
export MAX_MCP_OUTPUT_TOKENS=12000
export CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=95
export ENABLE_TOOL_SEARCH=true
# Do not set JAVA_HOME here. It gets written and re-written in ~/.bashrc
# export JAVA_HOME="/usr/lib/jvm/java-21-openjdk-amd64"
# Add Go binaries to PATH if Go is installed
command -v go >/dev/null 2>&1 && export PATH="$PATH:$(go env GOPATH)/bin"
# Part of the "pickjava" script
[ -f $HOME/javahome ] && source $HOME/javahome
# ----- TAB COMPLETIONS GO HERE -----
# Tab completion for kubectl, if available and supported
command -v kubectl >/dev/null 2>&1 && source <(kubectl completion bash 2>/dev/null) 2>/dev/null
# Tab completion for Helm, if available and supported
command -v helm >/dev/null 2>&1 && source <(helm completion bash 2>/dev/null) 2>/dev/null
# Tab completion for nerdctl, if available and supported
command -v nerdctl >/dev/null 2>&1 && source <(nerdctl completion bash 2>/dev/null) 2>/dev/null
command -v regctl >/dev/null 2>&1 && source <(regctl completion bash 2>/dev/null) 2>/dev/null
# Completions for the alias "k" (only if kubectl completion is loaded)
declare -F __start_kubectl >/dev/null 2>&1 && complete -F __start_kubectl k
export SYSTEMD_EDITOR=vim
alias cls=clear
# Limit was 16K tokens
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=32000