Questions tagged [autocomplete]
A feature provided by interactive programs such as shells and text editors that inserts text to complete a word or phrase that the user is likely intending to compose.
872 questions
0 votes
0 answers
14 views
Exclude files from zsh tab completion based on exit code of external tool
I'd like to use my current zsh autocompletion setup but filter out some of the results. I've set up an autocompletion file and put it in my fpath so that it gets autoloaded. But there's one critical ...
1 vote
1 answer
91 views
Why doesn’t zsh autocomplete .java source files when using java MyFile.java?
Since Java 10 as I recall, we can run Java source files directly from the command line: bash $ java Math.java The JVM compiles and executes the file automatically. However, in zsh, tab autocompletion ...
2 votes
1 answer
319 views
Debian: bash-completion does not work with "sudo bash" and "su"
After installing bash-completion on Debian testing (nearly Debian 13), completion works without any additional configuration in my normal user account. This is because of /etc/profile.d/...
1 vote
0 answers
29 views
Display all commands matching a glob [duplicate]
How can I get Bash to list the first (or all) commands that match a given glob? For example, let's say I'm looking for a command called cat. I can do type cat and it will search $PATH and tell me ...
0 votes
1 answer
67 views
No space after option with bash completion
I'm trying to filter bash-completion suggestions. Here awf-gtk2 -s abc.png [TAB] display -h --help -s --screenshot (it's ridiculous) / and awf-gtk2 -s[TAB] add a space after -s (perfect), with: ...
4 votes
1 answer
610 views
Why does tab autocomplete sometimes not work?
In bash (Ubuntu 24.10, but I guess this would apply to other versions/distributions) when you type in a console a command you can use TAB to autocomplete the filenames of the current directory. ...
1 vote
1 answer
128 views
What is the use case of the `compadd -Q` flag in zsh completions?
When making a custom zsh completion, the compadd function has the -Q option. The zsh documentation describes the -Q option as follows: -Q This flag instructs the completion code not to quote any ...
1 vote
2 answers
288 views
How to get a file quicker in TAB:menu-complete binding?
In bash, when binding TAB with menu-complete, I can cycle through the current files in the lexicographical or alphabetic order. What if the file that I want is the last file in the order? How can I ...