From c53fb57ff032f6ee309c53be80d7b2fee0bed054 Mon Sep 17 00:00:00 2001 From: Ivan Golikov Date: Mon, 9 Dec 2024 23:53:02 +0100 Subject: [PATCH] Automatically adding alias for dotfiles command --- .local/share/dotfiles/install_dev_tools.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.local/share/dotfiles/install_dev_tools.yml b/.local/share/dotfiles/install_dev_tools.yml index 221eac4..ab62c10 100644 --- a/.local/share/dotfiles/install_dev_tools.yml +++ b/.local/share/dotfiles/install_dev_tools.yml @@ -25,3 +25,9 @@ state: present become: true when: ansible_facts['os_family'] == "Archlinux" + + - name: Ensure dotfiles alias exists in .zshrc + ansible.builtin.lineinfile: + path: "{{ ansible_env.HOME }}/.zshrc" + line: "alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" + create: yes