On Mar 17, 2010, at 3:35 PM, guillermooo wrote: > autocomplete() is executed always, regardless whether the user has > requested completions or not. The only early exit point of > autocomplete() is reached if DJANGO_AUTO_COMPLETE is false. Otherwise, > sys.exit(1) returns to the console. How is this avoided when you do > something like `manage.py sqlall<ENTER>`? Is the variable > DJANGO_AUTO_COMPLETE implicitly unset after each execution of the > completion bash script?
36 COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \ 37 COMP_CWORD=$COMP_CWORD \ 38 DJANGO_AUTO_COMPLETE=1 $1 ) ) The Python function is executed in a Bash subshell (that's what the outer round braces are for). COMP_WORDS/COMP_CWORD and DJANGO_AUTO_COMPLETE are local variables and available only within this subshell. Arthur -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.