Alex Rivera | Logout

TAB autocomplete python CLI

Asked 2012-11-27T02:25:22.293
9

I was just wondering if it is possible to write a Python script that is run in the shell that can provide suggestions to the user when they hit Tab?

for example, how certain applications can limit the file types suggested by what they support. I haven't found anything in optParse that does this?

Ideally it would be:

myScript.py [TAB] (shell prints list of options)

Any suggestions? Specifically using KDE under OpenSuse and tcsh

Much appreciated

Edit
Report

1 Answer

1

compleat enables tab-completion in bash using a simple usage description. !command syntax should allow to filter filenames dynamically.

answered 2012-11-27T07:05:03.020

Your Answer