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.

Tab completion is the most common form of Command-line completion.

122 questions
61
votes
5 answers

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 type git checkout dTab and develop is completed for…
dstarh
  • 735
  • 1
  • 6
  • 11
58
votes
1 answer

How can I make zsh tab completion fix capitalization errors for directories 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 ~ directory. Since I wasn't used to that and I use tab…
Aaron
  • 581
43
votes
1 answer

Make bash's tab-completion case-insensitive

Possible Duplicate: Case insensitive tab completion in Bash Is there any way to make the tab-completion in bash case-insensitive? For instance, if I have a file called Hello.txt and try to tab-complete it by typing he followed by Tab it will not…
Wuffers
  • 19,619
17
votes
4 answers

Bash completion makes bash start slowly

Starting a bash on my ubuntu system takes about 2 seconds. If I remove loading /etc/bash_completition in .bashrc it starts without delay. Of course I don't want to give up completition and I don't think loading that file is legit reason for a 2…
user75250
  • 287
15
votes
2 answers

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 may or may not contain files of that…
Rob I
  • 253
  • 1
  • 2
  • 6
15
votes
3 answers

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 in Sublime Text.
woodings
  • 657
13
votes
4 answers

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 cursor position. How do I make Vim complete one or once…
12
votes
4 answers

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 me to ~/projects/foo. What I'd like is to have a…
nifty
  • 355
8
votes
1 answer

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. To give me: $ ls mydoc2. mydoc2.pdf mydoc2.tex mydoc2.txt I face this situation…
Ryo
  • 389
8
votes
1 answer

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 and examination. On Windows (by default), if you…
Bruno
  • 616
8
votes
2 answers

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

If I type cat ~/.bashr then it completes to cat ~/.bashrc. If I type vim ~/.bashr then it completes to vim /home/neil/.bashrc... (It does the same with vi, which is aliased to "vim".) Can I turn that off?
Neil
  • 889
8
votes
2 answers

Smart tab completion (for directories)?

Are there shell versions that have a more intelligent tab completion? I'd like to be able to type cd foo- Then it would show me the possible completions along with numbers that I can type to select one of them: cd foo- (1) foo-bar1 …
dehmann
  • 2,333
8
votes
2 answers

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) files, e.g. $ ./some-batch-file.bat executes…
KRyan
  • 264
7
votes
2 answers

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), I wrote one line to do what I needed: complete…
zenatom
  • 121
7
votes
2 answers

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 /home/acctname/projects/blog/ and would then show…
Eric
  • 481
1
2 3
8 9