refactor(zsh): move configuration files
This commit is contained in:
parent
b7518872ff
commit
b58302c1ee
21 changed files with 17 additions and 7 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
export ZDOTDIR="$HOME/.config/zsh"
|
||||||
|
|
||||||
PROMPT_EOL_MARK=''
|
PROMPT_EOL_MARK=''
|
||||||
TERM=xterm-256color
|
TERM=xterm-256color
|
||||||
WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
|
WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
|
||||||
|
|
|
@ -15,9 +15,8 @@ sources=(
|
||||||
'prompt'
|
'prompt'
|
||||||
'post/completion'
|
'post/completion'
|
||||||
)
|
)
|
||||||
|
|
||||||
for s in "${sources[@]}"; do
|
for s in "${sources[@]}"; do
|
||||||
source $HOME/.zsh/configs/${s}.zsh
|
source $ZDOTDIR/configs/${s}.zsh
|
||||||
done
|
done
|
||||||
|
|
||||||
# Local config
|
# Local config
|
|
@ -14,12 +14,21 @@
|
||||||
|
|
||||||
- name: Configuration
|
- name: Configuration
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
src: "{{ role_path }}/files/{{ zsh_config_item }}"
|
src: "{{ role_path }}/files/{{ zsh_config_item.src }}"
|
||||||
dest: "{{ ansible_user_dir }}/{{ zsh_config_item }}"
|
path: "{{ zsh_config_item.path }}"
|
||||||
state: link
|
state: link
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: zsh_config_item
|
loop_var: zsh_config_item
|
||||||
with_items:
|
with_items:
|
||||||
- .zsh
|
- { src: config, path: "{{ ansible_user_dir }}/.config/zsh" }
|
||||||
- .zshenv
|
- { src: .zshenv, path: "{{ ansible_user_dir }}/.zshenv" }
|
||||||
- .zshrc
|
|
||||||
|
- name: Delete old files
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ old_files_item }}"
|
||||||
|
state: absent
|
||||||
|
loop_control:
|
||||||
|
loop_var: old_files_item
|
||||||
|
with_items:
|
||||||
|
- "{{ ansible_user_dir }}/.zsh"
|
||||||
|
- "{{ ansible_user_dir }}/.zshrc"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue