1
1
2
2
3
3
source ${ZDOTDIR} /aliases
4
+ source ${ZDOTDIR} /functions
4
5
5
6
# This is for zsh auto completion
6
7
autoload -Uz compinit
@@ -24,34 +25,30 @@ ssh-add ~/.ssh/personal/Adams-MBP_github 2> /dev/null
24
25
25
26
[[ /usr/local/bin/kubectl ]] && source <( kubectl completion zsh)
26
27
27
- # AWS default creds
28
- if test -f ' ~/.aws/credentials' ; then
29
- aws_profile=' default'
30
- export AWS_ACCESS_KEY_ID=$( aws configure get default.aws_access_key_id --profile $aws_profile )
31
- export AWS_SECRET_KEY=$( aws configure get default.aws_secret_access_key --profile $aws_profile )
32
- fi
28
+ # # AWS default creds
29
+ # if test -f '~/.aws/credentials'; then
30
+ # aws_profile='default'
31
+ # export AWS_ACCESS_KEY_ID=$(aws configure get default.aws_access_key_id --profile $aws_profile)
32
+ # export AWS_SECRET_KEY=$(aws configure get default.aws_secret_access_key --profile $aws_profile)
33
+ # fi
33
34
34
35
# Updates PATH for the Google Cloud SDK.
35
- file=' /Users/adam/google-cloud-sdk/path.zsh.inc'
36
- test -f $file && source $file
37
-
36
+ source_if_exists ' /Users/adam/google-cloud-sdk/path.zsh.inc'
38
37
# Enables shell command completion for gcloud.
39
- file= ' /Users/adam/google-cloud-sdk/completion.zsh.inc'
40
- test -f $file && source $file
38
+ source_if_exists ' /Users/adam/google-cloud-sdk/completion.zsh.inc'
39
+
41
40
42
41
# Enables the following plugins for zsh (without oh-my-zsh)
43
- os=$( uname)
44
- if [[ " $os " == " Darwin" ]]; then
45
- source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
46
- source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
47
-
48
- else
49
- # os == Linux
50
- source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
51
- source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
52
- fi
42
+ # macos x86
43
+ source_if_exists /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
44
+ source_if_exists /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
45
+ # macos ARM
46
+ source_if_exists /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
47
+ source_if_exists /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
48
+ # Linux
49
+ source_if_exists /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
50
+ source_if_exists /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
53
51
54
52
55
53
# Machine specific config
56
- file=" ${HOME} /.zshrc"
57
- test -f ${file} && source ${file}
54
+ source_if_exists " ${HOME} /.zshrc"
0 commit comments