-
Notifications
You must be signed in to change notification settings - Fork 0
/
universal_fish_vars
executable file
·49 lines (39 loc) · 1.6 KB
/
universal_fish_vars
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
#!/opt/homebrew/bin/fish
# should be run once to set initial universal env vars on a new install, after tool installation is complete
set -Ux fish_greeting "Good morning sunshine!"
# Default editor, etc
set -Ux PAGER vimpager
set -Ux VISUAL vim
set -Ux EDITOR vim
# Go Pathes
# set -Ux GOROOT (go env GOROOT)
set -Ux GOPATH ~/go
# Home Brew configuration
set -Ux HOMEBREW_NO_INSECURE_REDIRECT 1
set -Ux HOMEBREW_CASK_OPTS "--require-sha"
#### Java Pathing
set -Ux JAVA_TOOL_OPTIONS '-Djava.awt.headless=true'
# set -Ux JAVA_HOME (/usr/libexec/java_home)
# AWS and Friends
set -Ux AWS_VAULT_KEYCHAIN_NAME login
set -Ux AWS_SESSION_TTL 24h
set -Ux AWS_ASSUME_ROLE_TTL 1h
set -Ux RBENV_SHELL fish
set -p paths_to_prepend_if_not_present /usr/local/opt/coreutils/libexec/gnubin
set -p paths_to_prepend_if_not_present /opt/homebrew/bin
set -p paths_to_prepend_if_not_present /usr/local/bin
set -p paths_to_prepend_if_not_present ~/.rbenv/shims
set -p paths_to_prepend_if_not_present /usr/local/sbin
set -p paths_to_prepend_if_not_present ~/bin
set -p paths_to_prepend_if_not_present ~/.fzf/bin
set -p paths_to_prepend_if_not_present $GOPATH/bin
set -p paths_to_prepend_if_not_present ~/Library/Python/3.7/bin
# prepend paths we want on the user's path, but only if they are not already on the fish_user_paths var
for path in $paths_to_prepend_if_not_present
# if fish_user_paths is not yet set, set it and make it universal
set -q fish_user_paths
or set -U fish_user_paths $path
# check if fish user paths contains our candidate and prepend if not present
contains $path $fish_user_paths
or set -p fish_user_paths $path
end