-
Notifications
You must be signed in to change notification settings - Fork 1
Extra functions
Patrick edited this page May 9, 2024
·
1 revision
Distribute a custom .zshrc
file with autosuggestions and syntax-highlighting functions.
- Install the zsh package.
- Set zsh as default shell for the specified users.
- Distribute a custom
.zshrc
for each user. - Install autosuggestions and syntax-highlighting.
main.yml
file in your project folder:
- name: zsh
hosts: all
vars:
zsh_config_backup: false
zsh_config_overwrite: true
zsh_users:
- lorem
- ipsum
zsh_users_config:
- template: "zshrc.j2"
filename: ".zshrc"
zsh_dependencies:
- zsh-autosuggestions
- zsh-syntax-highlighting
roles:
- bec.shell.zsh
tasks:
- ansible.builtin.debug:
msg: "ZSH was installed and additional functions were enabled."
zshrc.j2
file in your templates folder:
{% if zsh_config_overwrite is true %}
#
# {{ ansible_managed }}
#
{% endif %}
autoload colors && colors
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh