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
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
342 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
172 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
79 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
56 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
479 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
394 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
758 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
857 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 ...
22
votes
0answers
566 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
479 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
406 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
550 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
744 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 ...
0
votes
1answer
502 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
797 views
+100

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
238 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
622 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
571 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
6k 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
411 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
381 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
333 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
686 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
149 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
2k 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
309 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
329 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 ...
5
votes
4answers
5k views

Apt-get autocompletion

I am currently running 64-bit Debian Wheezy. I am having some trouble with auto completion for apt-get. I have bash-completion installed. If I am logged in as root in a shell, I can use auto ...
4
votes
1answer
372 views

Custom bash completion with directories and a fixed set

I'm trying to setup a bash completion, and have two problems For parameter one, I needed a completion for directories For parameter two, a fixed array for completion, I just don't know how to let ...
5
votes
1answer
991 views

Autocomplete of filename in directory

This question is quite similar to this one, but I can't understand the solution. I also know this tutorial, but still I am unable to understand what I am doing wrong. I am trying to autocomplete the ...
2
votes
2answers
134 views

Bash completion for `unset` command

How can I setup bash completion for the unset command, like when you use echo $XXX, you can get a completion for XXX?
3
votes
1answer
353 views

Zsh autocomplete ls command with directories only

Suppose I have following files and directories: % ls bui00293 buiawer builds/ buiowpe/ I want to list the content of ...
3
votes
1answer
247 views

Pipe zsh auto completion list to file or less

zsh: do you wish to see all 923 possibilities (462 lines)? Yes please, but in a file or less.
1
vote
2answers
781 views

autocomplete filenames using compgen

As part of a larger autocomplete function I'm writing, I want to use compgen to generate a list of files. I read the bash manual entries for compgen and complete, and from there I assumed that the ...
7
votes
1answer
375 views

How to output string completions to stdout?

Some of the git commands have many options, and it would often be useful to search through them for the one I need - I was just looking for the option which controls the TAB width in git-gui, but ...
2
votes
1answer
732 views

Avoid a trailing slash in bash when completing a directory name (like zsh)

I'm on a Mac and the cp and mv commands are killing me due to them copying the contents of a directory if a trailing slash is present. It has bitten me more than once when I use tab completion to ...
10
votes
1answer
3k views

Terminal autocomplete: cycle through suggestions

I had this on my Ubuntu setup and since I switched to Fedora I want to set it and I forgot how... The idea is simple : I don't want the terminal to show me suggestions when I double tab, instead I ...
9
votes
3answers
675 views

How to pipe the list of commands displayed by of “tab complete”?

When using commands in bash I like the double tab option to display the available commands. Some commands have more possible matches than others: Is there a way I can pipe the output of the double ...
14
votes
0answers
495 views

How to fix tab completion so it doesn't hide entries?

I'm using oh-my-zsh on Mac OS X with homebrew'ed zsh 4.3.12. I stumbled recently on a weird problem. In scripts/not-used I have several .R files: breakdowns.R eventloop.R ...
4
votes
2answers
371 views

Saving tab completion possibilities to a file

Instead of displaying all possibilities on terminal screen, as in: $ ls /etc/<TAB> Display all 230 possibilities? (y or n) I want to save all possibilities to a file. ls /etc/ > file.txt ...
8
votes
6answers
441 views

How to disable emacs here document completion

When editing a bash script file with emacs, and trying to enter <<<, at the second < emacs insert a template for a here document, like in the following example: <<EOF EOF This is ...
3
votes
2answers
2k views

Tab autocompletion and history in tcsh

I use tcsh, and I'd like to set up the following behaviour, which I've seen on some systems in the past. If I type !string TAB then: If the history contains a unique entry beginning with string, ...