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.

learn more… | top users | synonyms (2)

1
vote
1answer
267 views

How can one provide colour to tab completion in tcsh?

(Crossposted from StackOverflow.com) This question and the answer teach us how to introduce colour into tcsh prompts. This webpage explains nicely how to get colour into any output of the echo ...
4
votes
1answer
2k views

Why is zsh (oh-my-zsh) completing directories that don't exist?

UPDATE 3 I've worked out that these annoying autocomplete options are actually usernames. I.e. they exist in /etc/passwd I have users such as _kadmin_admin and _kadmin_changepw and many others ...
1
vote
3answers
400 views

VIM only files, cd only directories

When using Tab for completion on the Bash shell prompt, is there any way to configure it to complete only files for the command vim and only directories for the command cd? In large directories with ...
4
votes
0answers
23 views

Forward Autocorrect to a script [duplicate]

Possible Duplicate: How do I get bash completion for command aliases? I wrote a series of scripts to make package management a little more intuitive for me. However, I can no longer tab ...
9
votes
2answers
1k views

Command line prediction

I've found an interesting paper: Predicting UNIX Command Lines about command-line prediction (based on user past activity), and I wonder if any actual implementation of such thing exists?
7
votes
2answers
2k views

Create bash completion script to autocomplete paths after is-equal sign?

I want to create a bash completion script which recognises arguments of the form --arg and --some-arg=file. After reading this tutorial and some examples in /usr/share/bash_completion/completions/, ...
5
votes
2answers
597 views

Bash autocomplete: first list files then cycle through them

Is it possible to configure bash in such a way that on the first tab autocomplete it lists all possible files and on subsequent ones cycles through the choices? Both options are easy to do ...
1
vote
3answers
805 views

vi <TAB> completes only directories in bash

In a directory I type vi and then tab (twice), this gives me user$ vi CMakeFiles/ global/ libs/ whereas ls followed by 2 tabs gives me user$ ls ! core.log CMakeFiles/ global/ libs/ ...
1
vote
1answer
478 views

refresh bash tab completion

I have a script for auto-completing my ssh-hosts. If I change my ~/.ssh/config the auto-completion is not updated automatically, though. This does not surprise me. In a new shell, the new entry is ...
5
votes
1answer
244 views

Custom bash autocomplete for git breaks other git autocomplete features

I am trying to add autocompletion to git commit upon hitting TabTab. The autocomplete feature I am working on is based on a branch-naming convention. The convention is to append the PivotalTracker ...
2
votes
2answers
2k views

How to fix Linux filename tab autocomplete that is appending a space instead of trailing slash on directories?

For some strange reason my filename autocomplete is behaving differently than normal. Given the following file structure ./foobar/file.txt, if I want to delete file.txt, I type rm ...
2
votes
3answers
715 views

How to append / extend zshell completions?

I am using zsh with oh-my-zsh. Unfortunately, oh-my-zsh does not use file ~/.ssh/config for hostname auto-completion (see Issue #1009, for instance). This could easily archived by the following code: ...
7
votes
2answers
310 views

Need help on this bash auto completion script

I'm trying to setup autocompletion for a command, which takes only one parameter, a folder name, In /secure/kernel_builds/, I have the three following subfolder: 3.5.6/ 3.6.2/ source/ Now I want ...
4
votes
3answers
5k views

Bash Auto-Completion feature for SSHing into Different Hosts

I have big list of servers which I normally ssh to all the time. Is there any way using bash or zsh so that I can keep the list of hostname and bash auto-completion goes through the file and gives me ...
2
votes
1answer
195 views

Stop tab completion suggesting 'messagebus'

I've got a directory called build, which I cd into quite a bit. If there isn't any directory bu* in the current directory, zsh tab completion: cd buTAB suggests messagebus/, which isn't in .. If I ...
1
vote
2answers
97 views

bash autocompletion resets on every window

My terminal autocompletion does not work properly when I use root. source /etc/bash_completion works if I invoke that manually. I need to write above code in every new root terminal to be able to ...
4
votes
2answers
366 views

Inhibit Variable Expansion in Paths

How do I prevent Zshell (and Bash I assume) from expanding environment variables in paths be completed as shown in the following example: $PREFIX/alt/li should expand to $PREFIX/alt/lib and not ...
2
votes
1answer
182 views

Change completion behaviour with brace expansion in zsh

I have got used to using tab-autocompleting inside braces without expanding in zsh. This was possible, while I used zsh with a basic grml-config. Since I migrated to oh-my-zsh, I can't reproduce this ...
1
vote
1answer
80 views

Tab completion when `patch` asks for filename

When the patch command doesn't find the file to patch, it asks for a filename. Is there any way to get this to use tab complete?
4
votes
1answer
62 views

List the bash completion that's current active on a program?

Is there anyway to list the bash completion function in use for current command ? e.g for ls
3
votes
2answers
511 views

How to enable local ~ autocompletion for scp?

Too late: The machine, OS and configuration in question is no longer in use, so I can't verify any more suggestions. I have not encountered this problem in Fedora or Arch Linux. If you are having this ...
2
votes
2answers
437 views

Executing zsh rehash after build

I have a build script that can change what binaries are in my $PATH (it doesn't edit $PATH itself, but it adds/deletes files to folders that are already in $PATH). zsh's autocompletion doesn't update ...
3
votes
1answer
788 views

oh-my-zsh completion on home directory names

I recently switched to zsh from bash, and I'm using oh-my-zsh. There's a completion behaviour I don't want: in any directory, the list of autocompletion candidates seems to include the names of all ...
5
votes
1answer
895 views

Git auto-complete

I am using Git as many of you do. Also, I don't use any GUI for that — just CLI. So I was wondering: are there any way to make Git commands (git status, git checkout etc.) complete themselves when ...
26
votes
0answers
660 views

Completing avfs fake directories in zsh

How can I tweak zsh's completion system to complete “fake” files in some circumstances? More precisely, the AVFS filesystem exposes archives as directories by creating a “fake directory” next to ...
6
votes
3answers
497 views

Bash autocomplete gives different file name than ls

An incredibly strange thing just happened. Through a serious typo, I entered cp filename.xsl .^?~ Yeah, that's right, dot-caret-questionmark-tilde! Truth is stranger than fiction. It gets weirder. ...
5
votes
3answers
1k views

Auto-completion of words from the terminal buffer

In editors like vim and emacs, one can use hotkeys like C-p (vim) or M-/ (emacs) to perform auto-completion on the current word using other words in the same buffer. Is it possible to achieve the ...
3
votes
1answer
425 views

Vim insert mode completion for sentences

I would like to have insert mode completion for sentences rather than lines in vim. C-x C-l completes lines, but cannot complete sentences that do not start with a new line. For example: I have a ...
6
votes
1answer
599 views

Cancel zsh tab completion

Is there a way to cancel a completion once it has been started? I sometimes foolishly press tab to autocomplete make targets (only from sheer indolence) and then end up having to wait for a longer ...
5
votes
2answers
1k views

vim custom pop up menu

How do I create a custom completion pop up menu. I would like to be able to begin typing a part of a string then press a custom key combination to bring up a pop up completion of just a certain group ...
0
votes
2answers
797 views

Phrase Express Equivalent for Linux?

Is there some sort of auto text-insertion program with macros, similar to PhraseExpress for Windows in Linux? In case you've never seen this application it offers the following features: Organize ...
4
votes
2answers
3k views

What causes ln: //: Is a directory?

When linking a directory to root, I get this error: $ ln -s ~/inbox/ / $ ln: //: Is a directory Bash autocompletes the directory path by adding a /. I've tried escaping without success. $ ln -s ...
1
vote
1answer
535 views

How to disable autocompletion for sudo …?

I am new to zsh and I like it a lot, especially with oh-my-zsh plugin. I installed oh-my-zsh with its default values and can't figure out how to turn off autocompletion for specific commands, that I ...
5
votes
2answers
845 views

How to enable tab completion of wildcards in bash?

How can I enable tab completion in bash for a statement such as vim db/migrate/*crea? Essentially I am looking for tab completion to match the regular expression and present the options. How would ...
2
votes
1answer
239 views

How ignore PATH with `source` completion

I can't find any 'detailed enough' documentation about zstyle, and I'm surprised that no one faced this problem before: here is what I get with tab completion: source l<TAB> l2ping* ...
2
votes
1answer
110 views

Complete only at the beginning of the word

I've got an issue with ZSH autocompletion, and I can't find the right keyworks to get rid of it. For instance, with files like $ ls Accelion, titi toto tata I would like to write: $ ls ...
4
votes
3answers
2k views

How can I expand a relative path at the command line, with tab completion?

In bash is there any way to expand a relative path into an absolute path, perhaps with tab completion? I ask because sometimes I will search for a file, find it, then vim it: cd /etc cd apache2 cd ...
3
votes
1answer
680 views

Complete files from a different directory in bash [duplicate]

I wrote two functions push and pull to copy files to and from a directory ($FILE_EXCHANGE_DIR). I want bash to autocomplete names from that directory when I use the pull function. I want the ...
12
votes
1answer
609 views

Dynamically update completion list in zsh

I find zsh's result lists for Tab completion quite useful, however I'd like to tweak their behaviour a bit: They should appear when I Tab for the first time and afterwards dynamically update with ...
21
votes
3answers
7k views

How to enable autocompletion for remote paths when using scp?

I remote copied a file to my laptop using: scp someFile USER@192.168.178.32:/home/USER/put/it/some/where/oh/damn/you/here I want to be able to autocomplete the remote path by hitting tab.
2
votes
1answer
445 views

Configure autocomplete for the first argument, leave the others alone

I have a utility that takes a load of different arguments. For now, I want to autocomplete the first argument, but leave all the others to fall through to normal autocompletion. How do I do that? ...
5
votes
2answers
408 views

How to specify timeout for tab completion in zsh?

Zsh's completion feature is great except for this one. When I try to complete in a folder with lots of files/network folder, it takes a couple of minutes and prints this error. example.com:~$ ls ...
3
votes
1answer
349 views

ZSH takes two tabs to complete filenames

I love Zsh's tab completions, but it's frustrating when there is only one possible option and I have to tab twice to tab complete the filename. For example, if this is a list of files in a directory: ...
1
vote
1answer
716 views

Autocompletion for Makefile rules in tcsh

I'm using tcsh in a SUSE 11 box and I realized that when typing makeTab it allows me to auto-complete the rules available within the Makefile, not the files that are inside the current directory. ...
2
votes
1answer
154 views

Files with no .sh extension not considered for autocompletion in zsh

I have noticed that unless I add an .sh extension to my shell scripts, Zsh does not suggest them for autocompletion for execution despite having them in my PATH. I have the same problem if I cd into ...
2
votes
1answer
3k views

Terminal does not source .zshrc with custom colors for ls and cd command

I customized the directory and file colors for ls and cd + TAB. Here is my configuration. My configuration My system environment. Ubuntu 10.10 zsh 4.3.10 (x86_64-unknown-linux-gnu) oh-my-zsh // ...
6
votes
4answers
2k views

How does Bash path completion work with sudo?

Tab path completion does not work (at least on Ubuntu and AFAIK Arch) with sudo mount <whatever> The iso file I am trying to mount is not in /etc/fstab. If I just type mount <whatever> ...
5
votes
1answer
326 views

zsh - fully expand binary path on <tab>

In my current zsh behaviour, hitting tab after typing "sudo" just adds a space. $ sudo ... What I really want is for the tab to fully expand to the path of the binary it is about to execute when I ...
4
votes
2answers
2k views

Disable bash tab completion

Is it possible to disable bash's autocomplete on pressing tab? The reason I want to do this is that I often paste code from an editor where I use the tab character instead of a number of spaces for ...
4
votes
2answers
344 views

zsh autocomplete directory

I'm new to zsh and one thing that I do quite often is execute shell scripts that are in a directory of mine called Scripts. I'm not always inside of the Scripts directory, however... I may be in ...