Results 1 to 2 of 2

Thread: Tab Options for command line script

Hybrid View

  1. #1
    Join Date
    Aug 2008
    Location
    WI
    Beans
    215
    Distro
    Ubuntu

    Tab Options for command line script

    Hello World!

    I think it would be useful to have that "tab" autocomplete feature on some of my cli apps. Now if you don't know what I mean, take a look at aptitude or apt-get, if you hit tab after typing just apt-get it will display a list of possible parameters. My question is, how do I get this in a python script?

    Thanks,
    abe

  2. #2
    Join Date
    Sep 2009
    Location
    Freiburg/Germany
    Beans
    1,112
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Tab Options for command line script

    That's a feature of the shell. For bash see the "Programmable Completion" section in the manpage and the examples in /etc/bash_completion.
    ClassicMenu Indicator - classic GNOME menu for Unity
    Unsettings - configuration program for the Unity
    Privacy Indicator - easily switch privacy settings in Unity
    Arronax - create and modify app starters

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •