github.com/ActiveState/cli@v0.0.0-20240508170324-6801f60cd051/internal/assets/contents/shells/bashrc.sh (about) 1 if [ -f ~/.bashrc ]; then source ~/.bashrc; fi 2 3 {{if and (ne .Owner "") (not .PreservePs1) }} 4 export PS1="[{{.Owner}}/{{.Name}}] $PS1" 5 {{end}} 6 7 cd "{{.WD}}" 8 9 {{- range $K, $V := .Env}} 10 {{- if eq $K "PATH"}} 11 export {{$K}}="{{$V}}:$PATH" 12 {{- else}} 13 export {{$K}}="{{$V}}" 14 {{- end}} 15 {{- end}} 16 17 {{ if .ExecAlias }} 18 alias {{.ExecName}}='{{.ExecAlias}}' 19 {{ end }} 20 21 {{range $K, $CMD := .Scripts}} 22 function {{$K}} { 23 {{$.ExecName}} run {{$CMD}} "$@" 24 } 25 export -f {{$K}} 26 {{end}} 27 28 echo "{{.ActivatedMessage}}" 29 30 {{.UserScripts}}