Questions tagged [tab-completion]

Tab completion is a user interface enhancement for shells and other command line programs. Typing the first few characters of a command (or argument) and pressing the Tab key results in the rest of the word being automatically completed by the program.

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

How to use tab for text auto complete system wide?

Mac OS suggests completions of some text in some instances. A particular example would be when writing an email. The default way to choose the suggested text is to use the downward arrow to highlight ...
0
votes
0answers
16 views

sudo password prompt interference in terminal when attempting tab complete on a command

In the terminal, With sudo -- Running command: sudo systemctl start nam <-- pressing tab here Expected result: sudo systemctl start name.service Actual result: [user@user~]$ sudo systemctl ...
0
votes
0answers
9 views

Tab completion and trailing slash on Debian [duplicate]

I've a rather fresh Debian installation. It has a small but rather annoying problem. Now I have to press the tab twice before a trailing slash appears at the end of directory. In example: If I want ...
0
votes
1answer
34 views

Disable bash completion of asterisk when ambiguos

My bash is autocompleting filenames in an unexpected way. I have a directory with 2 files: $ ls ssh-8ZwoymYvfDSu ssh-ha7JCIFmjUKR When entering some prefix of the name and pressing <tab>, bash ...
1
vote
0answers
53 views

Add shell (bash/zsh) tab completion to custom command by running existing completion with arguments

In our code base we have a few convenience executables that are automatically loaded to the environment for anyone cloning the code (using direnv). This is a general question, but for the purpose of ...
0
votes
1answer
26 views

Tab doesn't expand the path when using $_ to access the previously typed path

Consider the following scenario: I've used ls to list the contents of a directory, and I've used Tab to find the right directory, so I don't know the full path. And it's a potentially long path, so I ...
1
vote
1answer
138 views

zsh: Select menu auto-completion with single Enter/Return press

Once finding the auto-completion I want to select from the completions menu, I currently need to hit <Enter> twice - once to add the selection to the terminal, and once to execute the command. ...
3
votes
1answer
68 views

Tab completion closes SSH connection

I am using SSH connection to log into my Raspberry Pi. I used tab completion over SSH before and that worked perfectly. But now I am getting the "connection closed" message whenever I try to use tab ...
0
votes
0answers
38 views

BASH completion script is repeating the first string

I am running wsl(ubuntu 18) and virtualbox on my windows. I wrote some script to call virtualbox exe file to start, stop and reset some of vms. Those scripts are working fine. While creating ...
1
vote
0answers
22 views

git add tab completion doesn't return anything

I've recently done a new install of Linux Mint (19.2) running zsh 5.4.2 with oh-my-zsh running over the top. Everything is working normally as usual with regards to tab completion. However I've ...
0
votes
0answers
32 views

Understanding zsh blobing, alias, and tab completion

I am new to zsh and recently moved on from csh, due to obvious reasons. Oddly enough, its taking me slightly longer than I expected to port a lot of aliases which I use extensively. Here's one of ...
0
votes
0answers
22 views

Chrome DevTools: Tabcompletion Broken and Text Cursor glitching

A few weeks ago, something with the to have changed with my Chrome DevTools, more specificaly the Console Tab. This shows in 2 Ways. The Text Cursor does not show if there are Less than 2 Characters ...
0
votes
1answer
52 views

Enable all defined bash completion after a custom command

I have a custom script called oEd which basically runs any bash command following it and opens the output in my favorite Editor. Is it possible to enable all defined bash completion (supported by my ...
2
votes
1answer
251 views

How to Expand Abbreviations Inline in Fish Shell?

I'm trying to save some time in Fish Shell by setting an abbreviation (nu) to expand to the string: my-username@my-ip-address:/home/my-username What I'm hoping to achieve is to enter: scp some-file ...
0
votes
1answer
141 views

How do I make bash completion behave like this?

I’m not sure if what I’m asking is possible, but what I would like bash to do on tab presses is this: On the first tab press, expand a common prefix (skip/beep and do nothing, I don’t really mind, if ...
2
votes
2answers
623 views

Tab completion for .bat files in Git-for-Windows Bash

Git for Windows installs "Git Bash," a bash shell that works in Windows, which is very nice. It's based on MinTTY, I believe. As well as bash shell scripts, it can also execute Windows batch (.bat) ...
4
votes
0answers
81 views

TAB completion with .bash_history

I usually use PageUp/PageDown to search through .bash_history given a prefix. However, I regularly catch me pressing TAB multiple times before realizing that I need to use PageUp/PageDown in this ...
4
votes
1answer
193 views

Why does a value '-' (hyphen) in “tag-order” style prevent matching of the “executables” tag even if that tag is explicitly specified?

With the code below, everything works as expected: When I write c and hit the TAB key, I get the appropriate completions in correct order. When I write ./ and hit the TAB key, I get the ...
2
votes
0answers
183 views

How to customize the look of currently selected(highlighted) completion in zsh?

Main question I would like to add powerline characters at the start and at the end of the selected completion, like this: Started the completion menu by inserting a c and pressing the TAB key. ...
0
votes
1answer
479 views

Is it possible in bash to complete the middle of a word?

I have a simple bash completion script for my custom git branch searcher. #/usr/bin/env bash _branch_completions() { local word="${COMP_WORDS[COMP_CWORD]}"; if [ ! -z "$word" ] then ...
0
votes
0answers
25 views

PhpStorm 2017 autopopup completion not working outside <> symbols

If I type < symbol and then continue typing, autopopup completion works just as intended: But outside of <> tags(either html or php - <a></a> or <?php ?>, for example) ...
4
votes
2answers
799 views

Bash Autocomplete Subdirectory for Custom Command

I have tried for hours to get this working and feel like I've not come anywhere close. I am trying to shorten our workflow by tab-completing directory names from the Mac OS X Terminal. We have an ...
1
vote
0answers
104 views

turn of cycle completion?

How do I prevent ZSH cycling through matching completions but instead just presenting a list of remaining possibilities in a list? On my more recent OS installations I've started getting ZSH cycling ...
1
vote
1answer
513 views

Why would bash refuse to be case-insensitive?

I am working on a server where I seem to be unable to set bash to be case insensitive. I have the shell set to, set completion-ignore-case on But this does not seem to be working. I am working over ...
2
votes
1answer
502 views

zsh completion list-colors - partial colouring issue

Inspired by https://stackoverflow.com/questions/23152157/how-does-the-zsh-list-colors-syntax-work I wanted to have a different colour for the per-match descriptions in the menu list, but I can't get ...
1
vote
0answers
51 views

Tab-Complete (alphabetically) last match

We have a setup where jobs are dispatched and their results stored in directories with the same name but different trailing time stamp; eg.: result_20170111T090200 result_20170111T130500 ...
1
vote
0answers
458 views

ZSH auto-completion help not triggering for custom command options beginning with “--”

I often use the gencomp command with RobSis's zsh-completion-generator to generate ZSH completion definitions, and it works great for the most part! There is, however, one small caveat that I have ...
18
votes
1answer
6k views

how can i make zsh tab completion fix capitalization errors? for directorys and files

I switched to zsh completely on a previous arch install and i LOVED it mainly because arch is one of the distros that capitalizes your Documents, Downloads, Music and such directories in your ~ ...
2
votes
1answer
601 views

Run command on tab completion in zsh

I'm trying to set up a zsh function that will take me back to the top level git directory with an optional argument to move relative to that directory. I've currently got this which works: alias ...
3
votes
1answer
622 views

Add strings to zsh tab completion for all commands and arguments

I want to add the keywords foo and bar to be added to the auto completion results for any command or argument. eg: cd <TAB> should give foo and bar in the suggestions in addition to the ...
4
votes
1answer
2k views

Tab completion for command arguments fail in Cygwin due to `.exe` extension

Is there a configuration option in Cygwin so that when Bash completes the name of the command, the filename’s .exe suffix is ignored (not included)? Explanation of the problem When using tab ...
4
votes
1answer
253 views

zsh autocomplete results from function

I've been searching and searching and unable to find a clear way to do this: Slightly contrived example to hide details: Say I want to autocomplete tmux session names with a command that will open ...
1
vote
1answer
665 views

How to bash complete an alias as the command [duplicate]

I have an alias alias gi=git Unlike git, gi cannot complete on subcommands, paths, branches. How can I tell bash to "complete X as if it were Y"?
0
votes
1answer
349 views

Trouble creating Custom Completions for Sublime Text 3

UPDATED I'm working on Salesforce development using the MavensMate plugin for Sublime Text 3. I'm wanting to create a custom completions file that will contain some common HTML tag class names that I ...
1
vote
1answer
142 views

bash/readline doesn't autocomplete directory name

I have an executable in a subdirectory of the current directory: ~ $ ls -l src/users -rwxr-xr-x 1 me users 1001K Nov 17 18:52 src/users* I try to execute it by typing sr and then clicking tab. There ...
1
vote
1answer
707 views

How can I regenerate the “bash_completions” file from “bash-completion/completions” directory?

Somehow my /usr/share/bash-completion/bash_completion file (which is sourced by /etc/bash_completion) has been deleted. However, the rest of the bash-completion directory appears intact: there is ...
2
votes
1answer
935 views

How do I view the tab completion function for a command in bash?

I ultimately want to alias screen -r. I mostly want to do this because that command has an awesome tab completion feature that shows me the current GNU screen sessions. I want that power with the ...
1
vote
1answer
248 views

history-search-backward ignores search text after first space character?

I use a lot of git commands and since they are mostly 2-word command names, matching doesn't find the closest match. For example: # type in some commands git checkout - git status mvn test # try to ...
3
votes
2answers
405 views

Completion when pasting Bash command beginning with tabs

I'm writing a Dockerfile which I'm formatting using tabs (which I usually use everywhere). But I've copied a multi-line command where the second line begins with two tab characters, i.e.: apt-get -y ...
1
vote
1answer
930 views

SublimeText XML completions file

I apparently can't get autocompletion to work in my XML files. Here is my xml.sublime-completions file, which I added to the User folder: { "scope": "text.xml", "completions": [ { "...
0
votes
1answer
65 views

tsch: tab-complete filename after --flag=

One the small annoyances I have in my daily use of tcsh is when I start writing a command like this: # do_stuff --input=/path/to/some I wish to use tab-completion to finish writing /path/to/some/...
0
votes
1answer
2k views

zsh completion for all executables in path

I have written a script which itself takes as an argument any arbitrary executable in my $PATH. Is there a way to create a zsh (or bash) completion function such that I would be able to type myFunc ...
4
votes
2answers
1k views

bash complete: list directory names from a defined directory?

I need the directory names in /mailman/lists to tab-complete as an argument (without any slashes) to the 'list_members' command regardless of where I am in the filesystem. In tcsh (on our old server),...
5
votes
1answer
752 views

Bash partial glob expansion

I have a question similar to this one, but different: I want bash to use a glob expansion in auto-completion, if possible. For example, I would like $ ls *2.<TAB> To give me: $ ls mydoc2. ...
0
votes
1answer
49 views

Bash expansion to list from a directory

I tend to work on multiple projects, all stored inside my home (~) directory inside a directory called web. At one point all my projects were inside a single directory inside this; so to move from ...
4
votes
0answers
620 views

Can't tab complete in psql

For some reason, tab-completion isn't working in psql on my Mac. I can tab complete table and field names just fine in Ubuntu, but pressing TAB fails to work in Mac OS X. I can successfully use my Up/...
0
votes
1answer
208 views

Is it possible to have tab completion of drop-down lists in web pages in Firefox?

Does anyone know of a Firefox plugin that would enable tab-completion (or some other key sequence like Alt-L) of items in drop-down lists in web forms? e.g. ou<TAB>in<TAB>s<TAB> ...
5
votes
3answers
993 views

Do not expand wildcard on tab completion

I'm wondering how I can configure zsh to not expand the wildcard in a filename. For example I have a directory of a couple hundred files named as following: a.foo-bar a.foo b.foo-bar b.foo c.foo-bar ...
1
vote
0answers
43 views

Reusing _kill completion in .bashrc fails

I'm trying to extend bash completion alias perf-connect-process="perf record -p"; alias pperf=perf-connect-process; complete -F _kill perf-connect-process; complete -F _kill pperf; by reusing the ...
2
votes
1answer
304 views

How to hide a program from Linux's tab-completion

I have an account on a shared machine, and cannot access /usr/bin, where there are many programs which I never use. I'd like tabbing to ignore many of these programs. For example, I'd like on<TAB&...