Create zsh completion symlinks for installed commands

This commit is contained in:
Kenneth Benzie 2023-02-18 15:06:51 +00:00
parent 7148f492b0
commit bdbb6a3f3b

View File

@ -64,6 +64,19 @@
loop_control:
label: '{{item.dest}}'
- name: list commands with available completions
command:
zsh {{ansible_env.HOME}}/.config/zsh/list-commands-with-available-completions.zsh
changed_when: false
register: completion_commands
- name: install completions for available commands
file:
state: link
src: '~/.config/zsh/zsh-completions/src/_{{item}}'
dest: '~/.local/share/zsh/site-functions/_{{item}}'
with_items: '{{completion_commands.stdout}}'
- name: get absolute path
shell: command -v zsh
register: zsh