Re: Improving (and testing!) bash completion

2009-11-18 Thread Russell Keith-Magee
On Mon, Nov 16, 2009 at 6:35 AM, Eric Holscher wrote: > Hey all, > > What I did > > > First thing I did was write tests for the current behavior[1]. No tests were > written for the original commit, so if nothing else, these tests should be > commited. The link there works for the current

Re: Improving (and testing!) bash completion

2009-11-16 Thread Yuri Baburov
Hi Eric, Arthur, also argument can be a subcommand, and i don't understand how you intended to complete options. i.e. "manage.py migrate show -l --indent 4 h", and so that means like everywhere you need previous arguments sometimes to be accounted when making choices for the next one, and few more

Re: Improving (and testing!) bash completion

2009-11-16 Thread Arthur Koziel
Hey Eric, That's a very good idea. I've looked through the current management commands to see what arguments they take. The most used variants are: - no arguments - custom list - appname(s) - fixture(s) The problem with your proposal is the handling of multiple appnames and fixtures (e.g. "dja

Improving (and testing!) bash completion

2009-11-15 Thread Eric Holscher
Hey all, I recently was looking for a way to add bash completion to a management command that I made. With changeset 11526[0] during the djangocon sprints, bash completion was moved from bash into Python. Now there is a super basic bash script that calls django-admin.py with the correct environmen