Skip to content

Commit

Permalink
feat(zsh): Resolve issues with zsh reload
Browse files Browse the repository at this point in the history
  • Loading branch information
statcan-svc committed Feb 12, 2024
1 parent a914665 commit 8d85afa
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,9 @@ EOF
brew upgrade
brew cleanup
{{- end -}}

{{- if eq .host.type "wsl" }}
if [ ! -L /usr/local/bin/xdg-open ]; then
sudo ln -s /usr/bin/wslview /usr/local/bin/xdg-open
fi
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,9 @@ EOF
brew upgrade
brew cleanup
{{- end -}}

{{- if eq .host.type "wsl" }}
if [ ! -L /usr/local/bin/xdg-open ]; then
sudo ln -s /usr/bin/wslview /usr/local/bin/xdg-open
fi
{{- end -}}
2 changes: 1 addition & 1 deletion home/private_dot_config/exact_git/wsl.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if eq .host.type "wsl" }}
[credential]
helper = /mnt/c/Program\\ Files/Git/mingw64/libexec/git-core/git-credential-wincred.exe
helper = /mnt/c/Program\\ Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe
{{ end }}
2 changes: 1 addition & 1 deletion home/private_dot_config/shell/dot_bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# shellcheck shell=bash
# shellcheck source=/dev/null

# Load configuration bulk from non-login shell.
# Load configuration from non-login shell.
if [ -n "$BASH_VERSION" ]; then
if [ -f "$HOME/.config/shell/.bashrc" ]; then
. "$HOME/.config/shell/.bashrc"
Expand Down
4 changes: 4 additions & 0 deletions home/private_dot_config/zsh/dot_zlogout.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Load cross-compatible Bash logout definitions from separate file.
if [ -f "$HOME"/.config/shell/.bash_logout ]; then
\. "$HOME"/.config/shell/.bash_logout
fi
13 changes: 6 additions & 7 deletions home/private_dot_config/zsh/dot_zprofile.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{{- if eq .chezmoi.os "linux" -}}
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
{{- end }}

{{- if eq .chezmoi.os "darwin" -}}
eval "$(/opt/homebrew/bin/brew shellenv)"
{{- end }}
# Load configuration from non-login shell.
if [ -n "$ZSH_VERSION" ]; then
if [ -f "$HOME/.config/zsh/.zshrc" ]; then
. "$HOME/.config/zsh/.zshrc"
fi
fi
8 changes: 8 additions & 0 deletions home/private_dot_config/zsh/dot_zshrc.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@

export HOMEBREW_NO_AUTO_UPDATE=1

{{ if eq .chezmoi.os "linux" -}}
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
{{- end }}

{{ if eq .chezmoi.os "darwin" -}}
eval "$(/opt/homebrew/bin/brew shellenv)"
{{- end }}

# Powerlevel10k Configuration
# -----------------------------------------------------------------------------

Expand Down

0 comments on commit 8d85afa

Please sign in to comment.