53 lines
1.2 KiB
Go Template
53 lines
1.2 KiB
Go Template
|
# If not running interactively, don't do anything
|
||
|
[[ $- != *i* ]] && return
|
||
|
|
||
|
# Environment section
|
||
|
|
||
|
## Session Paths - These will be added to PATH
|
||
|
{{- range $sessionPath := .BashProfile.SessionPaths -}}
|
||
|
{{- $fullPath := printf "%s/%s" (env "HOME") $sessionPath.Path -}}
|
||
|
{{ print "" }}
|
||
|
{{ print "" }}
|
||
|
### Add {{ $sessionPath.Description }} to PATH
|
||
|
if ! [[ "${PATH}" =~ {{ $fullPath }} ]]; then
|
||
|
export PATH={{ $fullPath}}:${PATH}
|
||
|
fi
|
||
|
{{- end -}}
|
||
|
{{ print "" }}
|
||
|
{{ print "" }}
|
||
|
## XDG Directories
|
||
|
{{ print "" }}
|
||
|
{{- range $key, $value := .BashProfile.XdgDirectories -}}
|
||
|
{{ print "" }}
|
||
|
export {{ $key }}="{{ $value }}"
|
||
|
{{- end -}}
|
||
|
{{ print "" }}
|
||
|
{{ print "" }}
|
||
|
## Extra Environment variables
|
||
|
{{ print "" }}
|
||
|
{{- range $key, $value := .BashProfile.EnvironmentVariables -}}
|
||
|
{{ print "" }}
|
||
|
export {{ $key }}="{{ $value }}"
|
||
|
{{- end -}}
|
||
|
{{ print "" }}
|
||
|
{{ print "" }}
|
||
|
# Aliases
|
||
|
{{ print "" }}
|
||
|
{{- range $key, $value := .BashProfile.Aliases -}}
|
||
|
{{ print "" }}
|
||
|
alias {{ $key }}="{{ $value }}"
|
||
|
{{- end -}}
|
||
|
{{ print "" }}
|
||
|
{{ print "" }}
|
||
|
# Prompt
|
||
|
|
||
|
# External Sources
|
||
|
|
||
|
# Commands
|
||
|
{{ print "" }}
|
||
|
{{- range $command := .BashProfile.Commands -}}
|
||
|
{{ print "" }}
|
||
|
## {{ $command.Description }}
|
||
|
{{ $command.Command }}
|
||
|
{{- end -}}
|