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
1 answer
212 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> ...
Nick Booker's user avatar
6 votes
3 answers
2k 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 ...
BMorgenthaler's user avatar
1 vote
0 answers
46 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 ...
Nordlöw's user avatar
  • 207
2 votes
1 answer
384 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&...
Samizdis's user avatar
  • 249
4 votes
0 answers
676 views

How can I get bash to perform case insensitive tab-completion for my aliases and functions?

I have an alias like this: alias sshUntrusted='ssh -X -C -c blowfish-cbc,arcfour' But when I type $ sshun followed by Tab, Bash does not complete the alias. I have put set completion-ignore-case ...
FooBee's user avatar
  • 141
2 votes
1 answer
256 views

zsh tab completion to run scripts in current folder (.<TAB>scr<TAB>)->./script.sh

I have an issue with zsh (or oh-my-zsh): When I want to run a script in current directory, I do ./script.sh. In bash I could do .<TAB> and it would give me ./ where I could continue typing the ...
Paaske's user avatar
  • 123
3 votes
1 answer
713 views

tmux completion (not shell completion)

Is there any way to do completion of arbitrary text from your tmux session (e.g. output from previous commands)? Something similar to hippie-expand in emacs or Any word completion in vim? Note that I'...
mgalgs's user avatar
  • 2,402
0 votes
2 answers
424 views

A tab in Tmux results in an indent and tabcompletion

I ruined my tabcompletion in Tmux. When I use tabcompletion and I've multiple options which fit the prefix Tmux is acting weird. Assume I've a folder with subfolders downloads and documents. When I ...
OrangeTux's user avatar
  • 358
1 vote
0 answers
199 views

Tab completion that honors $CDPATH

I've installed bash_completion and set my $CDPATH. I can successfully cd to subdirectories of those in my $CDPATH. What I'd like to do from here is for tab completion to bring up files in those ...
Aurelia Peters's user avatar
1 vote
1 answer
182 views

How does tab-completion "know" what files there are in sub/super folder?

I wonder how tab-completion knows that certain file exists in a directory above the current directory or in the working directory? If I have a file named foobar in a subdirectory and I type in foo ...
Saaru Lindestøkke's user avatar
2 votes
0 answers
136 views

How to make tab completion work within parentheses

On my Ubuntu machine, I can do this emacs $(which first-part-of-executable<tab> and bash will tab-complete the full executable name. I enabled this myself by adding complete -c which to my ...
Shep's user avatar
  • 163
0 votes
2 answers
4k views

bash tab completion doesn't work on shell scripts

On my Fedora 19 system tab completion doesn't work for bash scripts when I have a sh at the beginning of the command line unless the script filename ends with a .sh. That is, if I type: $ sh file&...
vy32's user avatar
  • 3,381
6 votes
2 answers
2k views

Bash auto-completion of variables adds additional white space at the end

When I perform an auto-completion of a bash variable, an additional whitespace character is added at the end. So this: $FO[TAB] Becomes this: $FOO" " I added the quotes in order to denote the ...
user avatar
3 votes
2 answers
2k views

How can I prevent Supertab to try completion even if I just want to enter a tab?

Even when I have an empty buffer in vim, supertab tries to do a completion at the begining. How can I configure supertab to only try tab-completion if there's a character?
AME's user avatar
  • 269
0 votes
0 answers
258 views

Use zsh completion in vim instead of vim one

I like zsh completion where for example I can write f/o/fTab and get folder/other_folder/file.txt (I'm not sure, it's possible feature of oh-my-zsh, not zsh, but it seems that it doesn't matter) Also ...
RiaD's user avatar
  • 475
0 votes
1 answer
401 views

How to adjust tab completion in Sublime Text 2

Is there a way to "complete completion within completion"? Example: Completions: 'fra' => '\frac{$1}{$0}' 'bf' => '\mathbf{$0}' I do fra<tab>bf<tab> and want to have \frac{\mathbf{...
mreq's user avatar
  • 1,192
2 votes
1 answer
495 views

bash tab-completion list below prompt

Whenever I use tab-completion, the list of possibilities is displayed and the prompt is duplicated below (| indicates the final cursor position): $ vim ~/.<TAB> ./ ../ .bashrc .vimrc $ ...
Elmar Peise's user avatar
0 votes
0 answers
65 views

Use two different completions in tcsh

I want to make a tcsh completion that completes with both a relative directory (ie p/*/d/), or the output of a command (ie p/*/'completionterms'/). Is this possible? Looking at the tcsh man page it's ...
spookypeanut's user avatar
14 votes
2 answers
12k views

bash completion for filename patterns or directories

I'm trying to get a bash completion script set up and having some trouble. I would like to set it up so the completions listed are either files matching a particular extension, or directories (which ...
Rob I's user avatar
  • 243
15 votes
3 answers
6k views

Is there a shell which supports fuzzy completion as in Sublime Text?

I'm using bash and I was wondering if there is any plugin in bash or other shell which allows me to do this cat tfnislong.txt + [tab] completes to cat ThisFileNameIsSoLong.txt just like tab completion ...
woodings's user avatar
  • 647
4 votes
2 answers
1k views

zsh completion doesn't work under Cygwin for other drives

I'm on Win7 x64, Cygwin 1.7 and zsh (and using oh-my-zsh). Zsh newbie here. I've reviewed zsh autocompletion not working on cygwin and tried the solution there but no luck. My mount table: C: on /...
Raghu's user avatar
  • 143
1 vote
1 answer
213 views

Make emacs autocomplete cpp files over binary files

My question is similar to this one, except for emacs instead of vim. The issue is that I have a cpp file that I want to open and when I type f[TAB] it autocompletes to foo the binary file foo instead ...
gsgx's user avatar
  • 1,033
8 votes
1 answer
3k views

Bash-like, non-rotating filename tab completion with PowerShell

Under Windows, using PowerShell, is it possible to make the filename suggestion (using the Tab key) work like with bash under Linux? Let's assume a directory contains 3 directories: example1, example ...
Bruno's user avatar
  • 618
7 votes
2 answers
3k views

How do I restore tab-completion on shell variables on the bash command-line?

I've long set my most-recently visited directories to shell variables d1, d2, etc. On an ancient Fedora machine I could type a command like $ cp $d1/ and the shell would replace $d1 with text like ...
Eric's user avatar
  • 471
0 votes
1 answer
384 views

Windows 8 cmd %PATH% tab completion

I have to assume I was confused about the directory I was working in, but when I initially installed Win8, I would swear that I had %PATH% tab completion. As in >pi tab becomes >ping. Was I dreaming,...
Thomas's user avatar
  • 167
4 votes
1 answer
522 views

How do I get zsh tab completion to "vi **/foo<TAB>" to match and complete the first file matching "foo*" anywhere under the current directory?

How do I get zsh tab completion to cat **/foo<TAB> to match and complete the first file matching foo* in any subdirectory under the current directory? For example, do this while inside a fresh ...
Mike Morearty's user avatar
2 votes
1 answer
2k views

Bash filename tab completion

I have noticed sometimes that tab completion is helpfully filtered in bash. I am a java programmer and often use the java and javac commands in the terminal for quick or remote tasks. Say I have the ...
lynks's user avatar
  • 1,871
4 votes
1 answer
203 views

Unquoted completion lists in zsh

I noticed that autocompletion lists in zsh escape all filenames like this Age\ of\ Empires\ 2/ ePSXe\ 1.7.0/ Touhou\ Project/ Windows\ 98\ SE/ Aikisado/ Mathematica\ 8/ ...
user1002327's user avatar
4 votes
2 answers
2k views

Can bash (or a terminal) auto-complete (tab-complete) from terminal buffer contents?

Imagine I have a bash session in a terminal, just after some output: $ grep foo *.txt this.txt: something123 foo $ After this grep, let's say that my next command will take something123 as an ...
wodow's user avatar
  • 207
0 votes
5 answers
214 views

Tab-completion friendly names for start / stop

I have many scripts that are used to start and stop services. It is frustrating when using tab completion that you need to type: ./serviceScript.sh [sta|sto] before there is enough information for ...
Ben Page's user avatar
  • 101
2 votes
1 answer
250 views

left tab completion in bash or zsh

When I use standard tab completion in bash or zsh, I type the first part of a filename or path, then hit to complete the word. This works well unless I'm in a directory full of files where all of the ...
Barton Chittenden's user avatar
8 votes
2 answers
2k views

Why does bash tab-expand a tilde when I am completing a vim file name?

If I type cat ~/.bashr<TAB> then it completes to cat ~/.bashrc. If I type vim ~/.bashr<TAB> then it completes to vim /home/neil/.bashrc... (It does the same with vi, which is aliased to "...
Neil's user avatar
  • 879
2 votes
1 answer
1k views

sudo bash completion for locations user has no permissions for - how to handle?

Example: drwx------ 2 root root 16384 26. juuli 2009 lost+found How do I get this to show me completions: sudo ls -l /lost+found/<TAB> I'm looking for a solution that works across all ...
lkraav's user avatar
  • 1,249
3 votes
1 answer
1k views

Bash Shell Hangs on ?+Tab-complete

I often use tab completion in Bash when completing directories, but I find that it hangs for an unacceptable amount of time if I accidentally include a question mark in the directory. I'd like to know ...
michaelmichael's user avatar
58 votes
5 answers
19k views

How can I get bash to perform tab-completion for my aliases?

I have a bunch of bash completion scripts set up (mostly using bash-it and some manually setup). I also have a bunch of aliases setup for common tasks like gco for git checkout. Right now I can ...
dstarh's user avatar
  • 705
2 votes
2 answers
1k views

urxvt - tab expand environment variables

I am new to urxvt (moved from gnome-terminal -> Ubuntu 12.04 refugee). I am used to having environment variables expand in gnome-terminal by default Suppose that I have an environment variable "...
boffin's user avatar
  • 175
0 votes
1 answer
265 views

COMP_LINE not set despite bash completion being installed

I'm using homebrew's bash completion package on OSX, which is installed in /usr/local/etc/bash_completion. It's working fine, but there are many extensions for it which rely on various environment ...
cayblood's user avatar
  • 193
6 votes
1 answer
2k views

Is it possible to force bash tab completion suggestions to list in a single column?

When I'm typing a filename and double-press Tab, a directory listing occurs to suggest all options for the tab completion. By default it lists in the same format as ls however I would prefer it to ...
DanH's user avatar
  • 333
7 votes
2 answers
2k views

Bash: always display file possibilities on tab-complete

When I use tab for filename completion and there are more than ~100 matches, it displays something like "Display all 403 possibilities? (y or n)". This gets annoying when I do it many times a day. Is ...
fferen's user avatar
  • 173
4 votes
5 answers
1k views

Command-T for shell

I'm looking for a shell extension that allows me to do filename completion similarly to Command-T. Command-T a feature in TextMate and a plugin for Vim that allows you to select filenames by typing ...
Ryan Patterson's user avatar
12 votes
4 answers
4k views

Zsh, directory tab-completion with prefix

I have a directory where I put all my projects in, let's say it's ~/projects as an example. I've made a command called s which takes one argument, and moves me into that directory. E.g.: s foo moves ...
nifty's user avatar
  • 355
5 votes
4 answers
5k views

zsh completion will not work in emacs shell

I'm learning about the more powerful tab-completion and expansion capabilities of zsh, and they don't seem to work when I run zsh under emacs with M-x shell: cat $PATH<TAB> expands the tab ...
benhsu's user avatar
  • 631
3 votes
2 answers
114 views

Is there a way to tell the shell (zsh preferably) about a command?

I defined an alias: alias school="cd ~/School/3BaFys/" to quickly go to the folder 3BaFys which contains all of the directories I need this year. Is there a way to tell zsh that when I do: $school ...
romeovs's user avatar
  • 309
13 votes
4 answers
3k views

Vim command mode complete word

Is there a way to get Vim in command mode to complete words from the current file? Say I have this file: one two three once and I enter command line mode :myruncommand o| where | denotes the ...
Nickolay Kolev's user avatar
7 votes
2 answers
1k views

How do you set a minimum number of characters for Bash tab completion?

Is there a way to set a minimum number of characters to Bash's tab completion? My reason is that I often accidentally press the tab key on an empty command line and it takes forever to load the ...
Yuval Langer's user avatar
5 votes
2 answers
1k views

Access Finder's "Open With" menu from the commandline (for tab completion)

On Mac OS X, I know one can open a file from the commandline with its default application with open, and with other applications with open -a <application name>. Thus, open movie.avi open -a ...
ShreevatsaR's user avatar
3 votes
1 answer
204 views

Why does ~username/ change to /home/username if tab-completing a path with a space in it?

In ~jacksonc/temp/ there are two files, test.txt and space test.txt, both placed there through Windows (using Samba). Using bash, if I type cat ~jacksonc/temp/t[tab] , it autocompletes to cat ~...
Cam Jackson's user avatar
  • 2,496
2 votes
1 answer
287 views

filetype-aware tab-completion in bash?

Is it possible to have filetype-aware tab-completion in bash? I.e. let's say there are two files in a directory, "foobar.txt" and "foobar.html", when I type "firefox foo" and then hit tab, bash would ...
user avatar
5 votes
2 answers
2k views

Setting up tab-completion of paths in bash or zsh to resemble tcsh

I’m a long time tcsh user, but all the cool kids seem to be using either bash or zsh nowadays (that is, completion patterns for git or stuff are available for bash and zsh, rarely for tcsh). My ...
Olivier 'Ölbaum' Scherler's user avatar
2 votes
0 answers
2k views

File completion colors for zsh

When I use Tab to complete a filename and more than one file matches, zsh uses an unsuitable color. Consider the following screenshot which exemplifies the problem: I have entered vi .zsh and pressed ...
Nickolay Kolev's user avatar