Re: line completion

2009-08-22 Thread Chris Rebert
On Thu, Aug 20, 2009 at 9:06 AM, Steven Woody wrote: > Hi, > I wrote a program that takes some user input.  Many inputs are quit often > used by user, so when a user launch the program, and type in "The Sha",  he > wants to get "wshank Redemption" displayed automatically in reversed color > (black

Re: Line completion with custom commands

2009-01-09 Thread gu
Marco Mariani wrote: gu wrote: I see, but how does django-admin work, then? from bash: complete -W "doSomething doSomethingElse doSomethingDifferent" myProgram This worked like a charm, thank you so much. Is this available for bash only or any shell? -- http://mail.python.org/mailman/lis

Re: Line completion with custom commands

2009-01-09 Thread Steve Holden
gu wrote: > Steve Holden wrote: >> gu wrote: >>> Hi, my Python program can be launched with a range of different options >>> (or subcommands) like: >>> >>> $ myProgram doSomething >>> $ myProgram doSomethingElse >>> $ myProgram nowDoSomethingDifferent >>> >>> I want it to use auto-completion with s

Re: Line completion with custom commands

2009-01-09 Thread Marco Mariani
gu wrote: I see, but how does django-admin work, then? from bash: complete -W "doSomething doSomethingElse doSomethingDifferent" myProgram -- http://mail.python.org/mailman/listinfo/python-list

Re: Line completion with custom commands

2009-01-09 Thread gu
Steve Holden wrote: gu wrote: Hi, my Python program can be launched with a range of different options (or subcommands) like: $ myProgram doSomething $ myProgram doSomethingElse $ myProgram nowDoSomethingDifferent I want it to use auto-completion with so that if i type "myProgram d" it returns

Re: Line completion with custom commands

2009-01-09 Thread Steve Holden
gu wrote: > > Hi, my Python program can be launched with a range of different options > (or subcommands) like: > > $ myProgram doSomething > $ myProgram doSomethingElse > $ myProgram nowDoSomethingDifferent > > I want it to use auto-completion with so that if i type "myProgram d" it > returns "m