Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
92a2d6c3
Commit
92a2d6c3
authored
Jul 24, 2014
by
Minh-Tue Vo
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1336 from edx/mvo/squashed_adding_paver_autocomplete
Adding the paver completion template to ansible playbook
parents
cef7ecbc
dbaa0ef6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
0 deletions
+30
-0
playbooks/roles/local_dev/tasks/main.yml
+7
-0
playbooks/roles/local_dev/templates/app_bashrc.j2
+2
-0
playbooks/roles/local_dev/templates/paver_autocomplete
+21
-0
No files found.
playbooks/roles/local_dev/tasks/main.yml
View file @
92a2d6c3
...
...
@@ -53,3 +53,10 @@
regexp=". {{ localdev_home }}/share_x11"
line=". {{ localdev_home }}/share_x11"
state=present
# Create scripts to add paver autocomplete
-
name
:
add paver autocomplete
template
:
src=paver_autocomplete dest={{ item.home }}/.paver_autocomplete
owner={{ item.user }} mode=755
with_items
:
localdev_accounts
playbooks/roles/local_dev/templates/app_bashrc.j2
View file @
92a2d6c3
...
...
@@ -15,3 +15,5 @@ else
fi
cd
"{{ item.home }}/{{ item.repo }}"
source
"{{ item.home }}/.paver_autocomplete"
playbooks/roles/local_dev/templates/paver_autocomplete
0 → 100644
View file @
92a2d6c3
# Courtesy of Gregory Nicholas
_paver()
{
local cur
COMPREPLY=()
# Variable to hold the current word
cur="${COMP_WORDS[COMP_CWORD]}"
# Build a list of the available tasks from: `paver --help --quiet`
local cmds=$(paver -hq | awk '/^ ([a-zA-Z][a-zA-Z0-9_]+)/ {print $1}')
# Generate possible matches and store them in the
# array variable COMPREPLY
COMPREPLY=($(compgen -W "${cmds}" $cur))
}
# Assign the auto-completion function for our command.
complete -F _paver paver
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment