Add completions integration to workstation env
This commit is contained in:
		@@ -6,10 +6,11 @@ if [ -f `which powerline-daemon` ]; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
export NVM_DIR="$HOME/.nvm"
 | 
			
		||||
export PROJECTS_DIR="$HOME/Documents/projects"
 | 
			
		||||
 | 
			
		||||
function gg() {
 | 
			
		||||
  cd ~/Git/$1;
 | 
			
		||||
  if [ -f ~/Git/$1/pyproject.toml ]; then
 | 
			
		||||
  cd "$PROJECTS_DIR/$1";
 | 
			
		||||
  if [ -f "$PROJECTS_DIR/$1/pyproject.toml" ]; then
 | 
			
		||||
    poetry shell;
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -17,6 +17,23 @@
 | 
			
		||||
    state: present
 | 
			
		||||
  loop: "{{ _local_human_users }}"
 | 
			
		||||
 | 
			
		||||
- name: Configure bash completions
 | 
			
		||||
  become: true
 | 
			
		||||
  ansible.builtin.blockinfile:
 | 
			
		||||
    path: ~{{ item.0 }}/.config/bash_completions
 | 
			
		||||
    create: true
 | 
			
		||||
    block: >-
 | 
			
		||||
      function _gg_completion() {
 | 
			
		||||
          local cur=${COMP_WORDS[COMP_CWORD]};
 | 
			
		||||
          COMPREPLY=( $(compgen -W "$(command ls $PROJECT_DIR)" -- $cur) );
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      complete -F _gg_completion gg
 | 
			
		||||
    owner: "{{ ansible_user }}"
 | 
			
		||||
    group: "{{ item.0 }}"
 | 
			
		||||
    mode: 0664
 | 
			
		||||
  loop: "{{ _local_human_users }}"
 | 
			
		||||
 | 
			
		||||
- name: Enforce ownership of the SSH keys
 | 
			
		||||
  become: true
 | 
			
		||||
  ansible.builtin.file:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user