Skip to content

Commit

Permalink
[zsh] fix grc not complession issue in Ubuntu 20.04
Browse files Browse the repository at this point in the history
  • Loading branch information
mqcmd196 committed Aug 14, 2024
1 parent 07340ad commit 0bbd1c1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion roles/zsh/config/rc.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ HIST_STAMPS='yyyy-mm-dd HH:MM:SS'

source /etc/zsh_command_not_found # for command-not-found

source /etc/grc.zsh # for grc command. TODO: Ubuntu 20.04's apt grc has the trouble with completion
source /etc/grc.zsh # for grc command

# enable comment out in command line
setopt interactivecomments
Expand Down
27 changes: 26 additions & 1 deletion roles/zsh/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,34 @@
- name: Install required packages for setting zsh
apt:
name: ['zsh', 'fonts-powerline', 'dconf-cli', 'grc', 'dbus-x11', 'zsh-syntax-highlighting', 'zsh-autosuggestions']
name: ['dconf-cli', 'dbus-x11', 'fonts-powerline', 'zsh', 'zsh-autosuggestions', 'zsh-syntax-highlighting']
state: present
become: yes

- name: Install grc
apt:
name: ['grc']
become: yes
when: not (ansible_facts['distribution'] == "Ubuntu" and ansible_facts['distribution_major_version'] == "20")

- name: Install grc for Ubuntu 20.04
block:
- name: Create ~/.local/src for cloning source
file:
path: "{{ ansible_env.HOME }}/.local/src"
state: directory
recurse: yes
- name: Git clone grc source
git:
repo: https://github.com/garabik/grc.git
dest: "{{ ansible_env.HOME }}/.local/src/grc"
depth: 1
version: v1.13
- name: Install grc
shell: >
./install.sh
chdir="{{ ansible_env.HOME }}/.local/src/grc"
become: yes

- name: Create directory for zsh configs
file:
path: "{{ ansible_env.HOME }}/.zsh.d"
Expand Down

0 comments on commit 0bbd1c1

Please sign in to comment.