I noticed that some programs (for example, hg) allow the user to tabulate individual parts of the command. For example, if in the working directory of the hg repository I type:
hg qpush --move b8<TAB>
He will try to execute the command with any mercury fixes in my patch queue that starts with "b8".
What I would like to do is to imitate this behavior in my program. That is, I have a number of commands that depend on files in a specific directory, and I would like to be able to provide a tab in the shell. Is there an API to provide this on Ubuntu Linux (preferably using python, as written in my script)?
jwir3
source share