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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

How do we add a jar for intelicense

I would like to get auto completion for android.jar. I have the location to android.jar.. and location to android.jar sources. How can I configure vscode to recognize the android source during code ...
Bret Joseph's user avatar
1 vote
1 answer
33 views

How to disable "long descriptions" of commands in ZSH

I have a program named fhome that provides shell completion for Zsh: $ fhome <tab> config -- Manage system configuration event -- Manage events help h -- Shows a list of commands or ...
Bartek Pacia's user avatar
1 vote
2 answers
71 views

SSH Config Host Autocomplete Command not Autocompleting

I wrote a function to get my hosts from ssh config without getting wildcard hosts: sshConfAutoComplete() { cat ~/.ssh/config | \ grep 'host ' | \ sed ' s#.*\*##g; s#host ##g ...
Nickotine's user avatar
  • 396
0 votes
0 answers
33 views

Enable filepath autocompletion when adding files with Git in Zsh

Let's say following is the output of my git status command. On branch LG-201 Your branch is up to date with 'origin/LG-201'. Changes not staged for commit: (use "git add <file>..." ...
Kartik Chauhan's user avatar
0 votes
0 answers
74 views

How to disable annoying autocomplete popup on Fedora Linux?

I'm running Fedora Linux 37 on a laptop computer with a touch screen. Occasionally, some process or something triggers and I start seeing this really obnoxious text autocomplete prompt whenever I type ...
Silvio Mayolo's user avatar
1 vote
1 answer
58 views

Where to put bash-completion scripts from 3rd party programs in Fedora?

A piece of software I would like to use, xsos, comes with a bash-completion script. Where is the correct place to store it on a Fedora system? Should I create a generic directory in my $HOME and then ...
Matteo's user avatar
  • 113
1 vote
0 answers
24 views

How to troubleshoot bash completion for git not working in subshell

When I launch my first bash shell, completion for git works (git rest<TAB>->git restore). After opening a second shell within the first one, tab completion is no longer working for git, but ...
Moberg's user avatar
  • 187
0 votes
0 answers
40 views

Does the implementation of a program provide the handler of the Tab-hitting event? [duplicate]

In bash, how does autocompletion know the options to complete a command? For example, when I hit key Tab after ls, it will list the files in the current directory. when I hit key Tab after ebook-...
Tim's user avatar
  • 100k
1 vote
2 answers
164 views

git autocompletions in Fish: how can I disable them or speed them up?

I'm running Fish shell (3.6.0) on Ubuntu. Let's say that I'm trying to run git add foo/bar.txt . I type: git add foo and then I press tab . Now the shell freezes up for a few seconds. Even pressing ...
Flimm's user avatar
  • 4,108
0 votes
1 answer
117 views

Why the option -P of compgen does not work?

I am playing around with the programmable completion of Bash and there is something I don't quite understand. Environment This is what I get when I run bash --version in my terminal. GNU bash, version ...
chemacabeza's user avatar
0 votes
1 answer
50 views

Should I use `set -u` in my terminal? Why does it break autocomplete for git?

I added set -u (equiv. set -o nounset) to .bashrc, but now some tab autocompletes fail with errors about unset variables. One example is for git autocompletes. Would this be a git autocomplete bug or ...
Jeremy Hunt's user avatar
3 votes
0 answers
104 views

Most recents files/directory suggested results by TAB completion with zsh

I would like to get with TAB suggestion on zsh to get the more recent file as first suggestion after a second TAB pushing. For the moment, I have with a first TAB pushing the list of the more recent ...
guizmo133's user avatar
0 votes
0 answers
101 views

Custom autocompletion for zsh function

I keep several pyenv environments in ~/environments. I've got this function in my .zshrc: actenv() { source ~/environments/$1/bin/activate } Is there a way to tell zsh to autocomplete the ...
Daniel Walker's user avatar
2 votes
1 answer
73 views

zsh gnu-screen tab completion for `-x` flag similar to `-ls`

In bash, when I type screen -x and press tab twice, I get a list of all the running sessions. In zsh, when I type screen -ls and press tab twice, I get a list of all the running sessions and can tab ...
Daniel F's user avatar
  • 837
0 votes
1 answer
88 views

BASH: use . instead of a space for command completion

I have bash function directory located at /git/function This is structure: /git/function/ ├── delete │ ├── delete.dir │ └── delete.file ├── main.sh ├── get │├── get.dir.sh │└── get.file.sh How to use ...
Rafal Niznik's user avatar
0 votes
0 answers
110 views

Zsh command history completion

How to have case insensitive in retrieving completion of command history in Zsh ? did put setopt NOCASEGLOB in ~/.zshrc but has nothing for help how is the correct way to do?
user avatar
0 votes
1 answer
161 views

Konsole auto-completion for link pointing to folder [duplicate]

Original Question When cding into a folder through a link, auto-completes does not add the last / unless I hit tab twice. How to change that behavior? MWE: cd /tmp/ && mkdir test && ...
Clément's user avatar
  • 328
1 vote
1 answer
39 views

conflict between bash and its auto-completer on the meaning of .. for symlink to directory

In my home directory /home/regis, after creating a symbolic link LINK to directory DIR/SUBDIR, and doing cd LINK, I have a conflict between bash and its auto-completer regarding what .. leads to. For ...
Regis's user avatar
  • 13
1 vote
1 answer
101 views

zsh completion: complete --options for custom script

I have zsh completion rule for custom script. My script can take zero or more options (starting with -) and zero or more arbitrary strings (patterns): _arguments -S : \ '--foo' \ '--bar' \ ...
Martin Vegter's user avatar
2 votes
0 answers
50 views

How to auto-complete "hashcat" options?

Is it possible to get auto-completion of hashcat command line options? What I mean is, when entering, for example, hashcat --incre, and then pressing Tab, I want that the incomplete option completed ...
UndercoverDog's user avatar
1 vote
0 answers
75 views

zsh vared: how to define custom completion?

I would like to launch a command that would read user input and pass each line as a new task to TaskWarrior: #!/bin/zsh set -e while vared -p 'task add> ' -eca task; do eval task add "${task[@...
khardix's user avatar
  • 11
1 vote
1 answer
214 views

set colored-stats ignores $LS_COLORS

Problem Bash <tab> autocompletion ignores $LS_COLORS variable and uses default color values. Setting I have a dircolors file and just the following declarations in .bashrc: eval `dircolors $HOME/...
Karolis Koncevičius's user avatar
2 votes
1 answer
315 views

Zsh completion: move into list selection on first tab

Short Description When I hit <tab> in zsh, I want the first completion candidate to be highlighted immediately instead of requiring me to hit <tab> a second time to focus the list. Example ...
Ashton Wiersdorf's user avatar
1 vote
2 answers
66 views

zsh completion: complete block devices in /dev

for my script, I need to complete block devices in /dev, so that when I do my_script.sh <TAB> it will complete /dev/ and offer me all disks that are listed in /dev (not in subdirectories). So ...
Martin Vegter's user avatar
0 votes
0 answers
40 views

Bash completion on multipart word

Apologies in advance if this has been answered before, I was not able to find it searching. In bash, I'm trying to figure out an elegant way to autocomplete a command line argument where a single word ...
Mark's user avatar
  • 1
0 votes
0 answers
204 views

Inconsistent behavior of zsh autocompletion after oh-my-zsh install

I recently got a fresh install of Manjaro KDE and used oh-my-zsh with the powerlevel10k theme to set up my terminal, but now I am seeing strange, inconsistent behavior. If I open a terminal, I have ...
lcleary's user avatar
0 votes
0 answers
565 views

Tab completion and Mobaxterm

I am using Mobaxterm to access cluster that is running on Bash. I have an absurd, but very annoying issue. When I installed Mobaxterm, Tab completion would end the path with a / and if you press it ...
Michael Listovski's user avatar
3 votes
1 answer
107 views

zsh completion: duplicate commands

Lets say I have an alias for grep. When I use zsh completion, it will offer grep twice (once as command, once as alias): gr<TAB> grep grep I found I can use ignored-patterns specifically for ...
Martin Vegter's user avatar
0 votes
1 answer
96 views

Zsh autocompletion for git bare repos

This is the completion code in my .zshrc: autoload -U compinit zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' zstyle ':completion:*' menu select zmodload zsh/complist compinit _comp_options+...
Stagnant's user avatar
0 votes
0 answers
39 views

How can I can autocomplete for my custom command, based on the name of files in another directory?

This is my requirement. We have a custom Ssh command that uses ssh under the hood, but automatically provides some options based on some conditions. For example, our developers can write Ssh example....
Saeed Neamati's user avatar
1 vote
1 answer
63 views

Don't jump to the end of the word after inword (completeinword) completion in zsh

I've been able to turn on autocompletion when the cursor is in the word: https://unix.stackexchange.com/a/736909/556055 But the whole point was that I can accept an autocompletion and resume typing ...
Andrew15_5's user avatar
3 votes
1 answer
513 views

Configure zsh to use tab autocompletion when in the middle of a word (ignore chars after the cursor) like in bash

In bash (\bash --noprofile --norc) when the caret/carriage/cursor (|) is in the middle of a word (l|!@#asdf) you can double Tab to show suggestions (ls for this example) for the word before the caret (...
Andrew15_5's user avatar
1 vote
4 answers
123 views

Path-like search for a file

Basically I am trying to get something similar to command search with $PATH, but with a different list of directories and the file I'm searching for is not executable. The list of directories is fixed ...
alexis's user avatar
  • 5,739
0 votes
0 answers
122 views

Zsh: make single file selection smart, stylish, and functionally correct (highlights, completions below cursor, etc)

I would like to have a near-flawless "single file selector" with zsh. So far I haven't seen one in questions as they tend to focus on zle settings for one's command line. Let's say we are ...
codepoet's user avatar
  • 576
1 vote
0 answers
43 views

Stop '@' in alias name preventing bash completion

On one laptop I have bash aliases for ssh-ing into various machines of the form loris@machineA loris@machineB On this machine I can type loris@<TAB> and bash will show me possible completions. ...
loris's user avatar
  • 195
0 votes
0 answers
60 views

How to build tab completion for string

I have the following code (taken from https://web.archive.org/web/20190402231844/https://debian-administration.org/article/317/An_introduction_to_bash_completion_part_2): _foo() { local cur prev ...
Foo's user avatar
  • 198
2 votes
1 answer
3k views

Suppress warning: egrep is obsolescent; using grep -E

When I run egrep, it shows warning: egrep is obsolescent; using grep -E But I'm using it as part of my shell autocomplete script that I often use, and I don't want to rewrite them. I'm looking for way ...
Kristian's user avatar
  • 249
2 votes
1 answer
177 views

zsh: How to identify which file zsh completion function comes from?

In zsh, how can one know which file a completion function is defined in or comes from? which can print the source code of a completion but it does not give any information about where I can find the ...
Jongwook Choi's user avatar
0 votes
1 answer
188 views

Bash auto-completion slow: /bin/bash hangs at rl_getc

When pressing tab to autocomplete a command (e.g. cd) bash hangs for a couple of seconds before completing it. when using set -x nothing is printed prior to the hang When using a tty console from ...
Bill Joe's user avatar
0 votes
1 answer
60 views

Complete a positional argument only once

I'm trying to write a completion for a command (call it gs) that takes an SSH hostname as its first argument, and an arbitrary string as the second argument. I've stolen this from the default SSH ...
Arno's user avatar
  • 3
0 votes
2 answers
43 views

dc3dd, why tab completion doesn't work?

On Slackware 15. Using dd I do dd if=/home/myuser/my..TAB and complete dir path after pressing tab using dc3dd I did dc3dd if=/home/myuser/my..TAB and nothing happen. Why? I have tried with rlwrap but ...
elbarna's user avatar
  • 12.4k
1 vote
1 answer
97 views

Fish completion that depends on other flags

I have a command, that can connect to remote machines and so the completion should be based on which machine the user provided. That means that if the user pass -D DEVICE_ID I want the completion to ...
yotamN's user avatar
  • 111
1 vote
0 answers
69 views

Avoiding support bash functions to show up in terminal sessions when tab-completing

I have a number of bash functions which I source from my .bashrc. I also have a bunch of support function that are needed but do not want them to show up in a terminal session when a user does tab-...
Vera's user avatar
  • 1,183
1 vote
1 answer
96 views

How having insensitive-case the Bash history completion [duplicate]

Is there a setting to enable case-insensitive history completion for Bash? I tried tab-completing cd s with cd Socket/in in my history but it didn't complete.
user avatar
1 vote
1 answer
161 views

How can I configure zsh completion to exclude `.` and `..`?

I configured my zsh following this answer. Then I found the completion now includes . and ... How do I remove them?
QuarticCat's user avatar
3 votes
1 answer
143 views

zsh glob qualifier with negated null glob works like it should with null glob

Note: Please don't respond about this being a XY situation. I am trying to understand how a globbing pattern works, not trying to achieve a specific result. Am also not interested in other ways to ...
codepoet's user avatar
  • 576
6 votes
1 answer
1k views

Particular bash completion files not working when in /usr/share/bash-completion/completions but work fine in /etc/bash_completion.d

I have a git repository where I keep some statically-linked binaries along with related man files and bash completion files, which are all 'installed' using GNU Stow to make the symlinks. I have ...
paradroid's user avatar
  • 1,183
0 votes
1 answer
255 views

compgen -o nospace option without effect

I'm trying to create a command completion function, and I was following this guide. This is approximately how it looks: function __my_completion () { local cur prev opts opts_log opts_import ...
RL-S's user avatar
  • 131
1 vote
1 answer
96 views

TAB expanding filenames after make command in bash

I'm preparing a makefile for converting org files to markdown files with the use of pandoc. Its content looks like this (note that conversion rule is just for a reference): %.md: %.org pandoc -t ...
martinoidar's user avatar
1 vote
1 answer
127 views

zsh: ignore symbolic links in completion list returned by _files

I am new to writing zsh completions. How can I ignore symbolic links from showing in completion returned by _files -W /path/to/folder/?
codepoet's user avatar
  • 576

1
2 3 4 5
17