Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8081603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:47:07+00:00 2026-06-05T16:47:07+00:00

This may be have a better name than custom tab completion, but here’s the

  • 0

This may be have a better name than “custom tab completion”, but here’s the scenario:

Typically when I’m at the command line and I enter a command, followed with {TAB} twice, I get a list of all files and subdirectories in the current directory. For example:

[user@host tmp]$ cat <TAB><TAB>
chromatron2.exe                  Fedora-16-i686-Live-Desktop.iso  isolate.py
favicon.ico                      foo.exe                          James_Gosling_Interview.mp3

However, I noticed at least one program somehow filters this list: wine. Consider:

[user@host tmp]$ wine <TAB><TAB>
chromatron2.exe  foo.exe

It effectively filters the results to *.exe.

Thinking it might be some sort of wrapper script responsible for the filtering, a did a which and file an it turns out wine is not a script but an executable.

Now, I don’t know whether this “filter” is somehow encoded in the program itself, or otherwise specified during the default wine install, so I’m not sure whether this question is more appropriate for stackoverflow or superuser, so I’m crossing my fingers and throwing it here. I apologize if I guessed wrong. (Also, I checked a few similar questions, but most were irrelevant or involved editing the shell configuration.)

So my question is, how is this “filtering” accomplished? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:47:09+00:00Added an answer on June 5, 2026 at 4:47 pm

    You will likely find a file on your system called /etc/bash_completion which is full of functions and complete commands that set up this behavior. The file will be sourced by one of your shell startup files such as ~/.bashrc.

    There may also be a directory called /etc/bash_completion.d which contains individual files with more completion functions. These files are sourced by /etc/bash_completion.

    This is what the wine completion command looks like from the /etc/bash_completion on my system:

    complete -f -X '!*.@(exe|EXE|com|COM|scr|SCR|exe.so)' wine
    

    This set of files is in large part maintained by the Bash Completion Project.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may turn out to be an embarrassingly stupid question, but better than potentially
I have this linq query that works well (although it may be written better,
This question may have been asked before, but I had trouble finding an answer,
This has / may have been asked before, but, as far as I remember,
Okay this may be a simple question but I have yet to come with
This may be a stupid question, but I have to ask! I have the
This may be an incredibly stupid question, but I have a web application that
This may have been answered before, and if so, point me to the answer.
I'm using a Java wrapper for SQLite called SQLiteJDBC - this may have some
This may be a little hard to describe since I don't have a sample.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.