aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tasks-reference')
-rw-r--r--tasks-reference/completion/text.xml30
1 files changed, 15 insertions, 15 deletions
diff --git a/tasks-reference/completion/text.xml b/tasks-reference/completion/text.xml
index 5d31211..fd36099 100644
--- a/tasks-reference/completion/text.xml
+++ b/tasks-reference/completion/text.xml
@@ -162,20 +162,20 @@ the following can be used as a template for creating new completion functions:
<codesample lang="ebuild" numbering="lines">
_foo() {
- local cur prev opts
- COMPREPLY=()
- cur="${COMP_WORDS[COMP_CWORD]}"
- prev="${COMP_WORDS[COMP_CWORD-1]}"
- opts=""
+ local cur prev opts
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ opts=""
- if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
- COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
- return 0
- fi
+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ fi
- case "${prev}" in
- # ...
- esac
+ case "${prev}" in
+ # ...
+ esac
}
complete -F _foo foo
</codesample>
@@ -272,9 +272,9 @@ complete -F _foo foo
(and -f for short) that takes any kind file, you could do:
<codesample lang="ebuild">
case "${prev}" in
- -f|--file)
- COMPREPLY=( $(compgen -f ? ${cur}) )
- ;;
+ -f|--file)
+ COMPREPLY=( $(compgen -f ? ${cur}) )
+ ;;
esac</codesample>
</ti>
</tr>