skylab
/
skylab-ansible
Archived
2
0
Fork 0

Compare commits

...

3 Commits

2 changed files with 10 additions and 2 deletions

View File

@ -6,7 +6,7 @@ if [ -f `which powerline-daemon` ]; then
fi
export NVM_DIR="$HOME/.nvm"
export PROJECTS_DIR="$HOME/Documents/projects"
export PROJECTS_DIR="$HOME/projects"
function gg() {
cd "$PROJECTS_DIR/$1";

View File

@ -17,6 +17,14 @@
state: present
loop: "{{ _local_human_users }}"
- name: Configure local bash completions loading
become: true
ansible.builtin.lineinfile:
path: ~{{ item }}/.bashrc
line: source ~/.config/bash_completions
state: present
loop: "{{ _local_human_users }}"
- name: Configure bash completions
become: true
ansible.builtin.blockinfile:
@ -25,7 +33,7 @@
block: >-
function _gg_completion() {
local cur=${COMP_WORDS[COMP_CWORD]};
COMPREPLY=( $(compgen -W "$(command ls $PROJECT_DIR)" -- $cur) );
COMPREPLY=( $(compgen -W "$(command ls $PROJECTS_DIR)" -- $cur) );
}
complete -F _gg_completion gg