Find the answer to your Linux question:
Results 1 to 3 of 3
Hey! For example: Code: $ find / -i <tab> ilname iname inum ipath iregex So apparently you van get tab-completion not only for files but also for arguments to programs. ...
  1. #1
    Just Joined! Erikw's Avatar
    Join Date
    Jan 2011
    Location
    Lund, Sweden
    Posts
    1

    Question Shell program argument tab-completion, how?

    Hey!

    For example:
    Code:
    $ find / -i <tab>
    ilname iname  inum   ipath  iregex
    So apparently you van get tab-completion not only for files but also for arguments to programs. How does this work? Is my shell communicating with the program and fetching a list of matching parameters? Does it guess by parsing the man file?

    I'm curious to know. Thanks in advance.

  2. #2
    Linux Newbie raghaven.kumar's Avatar
    Join Date
    Mar 2008
    Location
    Bangalore, India
    Posts
    209
    Maybe this can help you?
    linux - bash alias with argument and autocompletion - Stack Overflow
    autocomplete - Add arguments from previous command to zsh completion - Unix and Linux - Stack Exchange

    try googling, i think in zsh u have options for this.
    in bash, i suppose u have to create a 'alias'.

  3. #3
    Linux Enthusiast Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    717
    the shell interprets the <tab> as input and suggests autocompletion candidates. if you wanted to search for a file whichs name contained a <tab>, you would have to hack \t which would be used by find as a <tab>. this behaves similar to other non-readable characters like \r,\n, ..

Posting Permissions

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