Enable templating for dotfiles
This commit is contained in:
22
zsh/zshrc.j2
Normal file
22
zsh/zshrc.j2
Normal file
@@ -0,0 +1,22 @@
|
||||
[[ -z "$PS1" ]] && return
|
||||
|
||||
_zshdir="$HOME/.zshrc.d"
|
||||
|
||||
{% if machine.gpg_agent %}
|
||||
export GPG_TTY=$(tty)
|
||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
||||
{% endif %}
|
||||
|
||||
{% if machine.ssh_agent %}
|
||||
if $(ssh-add -l 2>/dev/null | grep -q "no identities") ; then
|
||||
ssh-add
|
||||
fi
|
||||
{% endif %}
|
||||
|
||||
for file in "${_zshdir}"/* ; do
|
||||
if [[ -e "$file" ]] ; then
|
||||
source "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
Reference in New Issue
Block a user