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)

2
votes
1answer
4k views

zsh completion installations (autojump) - How to use them?

I just installed autojump and have oh-my-zsh installed in my system. I have included the log of the installation at the bottom of this post. Note that at the end it says: zsh completion has been ...
2
votes
1answer
275 views

Autocomplete doesn't work for file parameters to jarsigner

I'm using Lubuntu 12.10. Assume I've got a file called test.apk in my current folder. 1.) In LXTerminal/bash if I type, adb install t<TAB> the terminal autocompletes it correctly to "test....
2
votes
1answer
198 views

zsh autocompletion for symlinks

Say I have a folder parent with a subfolder, subfolder and a symbolic link symbolic_link. I noticed that if my current working directory subfolder and I try to do cd ../sym[TAB], it will not ...
2
votes
1answer
311 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 ...
2
votes
1answer
118 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 cc<TAB&...
2
votes
2answers
164 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?
2
votes
2answers
2k 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 ...
2
votes
1answer
26 views

How to properly use “complete -G”? [duplicate]

I've generated the simplest code I could think of to illustrate my problem. Suppose I want the "foo" command to work with files that end with ".cc". complete -G '*.cc' foo Now let's suppose my ...
2
votes
2answers
98 views

How can I remove a command from bash completion?

For bash completion, I would like to replace youtube-dl with youtubedl. I can make an alias for youtubedl, however, both youtube-dl with youtubedl will exist. Primarily, I just want to remove ...
2
votes
2answers
90 views

Relationship between zsh custom completion script and compsys/zstyle configuration

I have written a simple completion script for a command cheat so that when using cheat at a prompt zsh will autocomplete arguments. (obviously) this needed to be setup in a compinit / compsys ...
2
votes
1answer
97 views

Search bash history for already typed command

When I type ctrl+r and then start typing I can see what commands in the history match which is great. Now is there a way to search the history on commands I have already typed in the terminal? For ...
2
votes
1answer
64 views

How can I configure zsh completion to launch a menu - for command options?

If I am cd'ing into a directory, there is a setting in my ~/.zshrc that tells zsh to always launch a menu when I hit tab on an ambiguous completion, e.g. ~% cd /etc/a tab will immediately cause a ...
2
votes
1answer
130 views

Bash autocompletion for an alias

This is in my .bashrc: alias p='sudo apt-get'; complete -F _apt_get p I've found the autocompletion only works if I've used autocompletion for apt-get at least once before trying to use it with the ...
2
votes
1answer
178 views

g++ bash: warning: programmable_completion: g++: possible retry loop

When I type g++ and do tab completion for file listing, I get this warning **g++ bash: warning: programmable_completion: g++: possible retry loop** I googled it and so far no results . Can ...
2
votes
1answer
296 views

csh: setting command completion for `cd` to show both directories and files

In my csh terminal, when I do: ls tab -- it shows everything in the current directory as a possibility cd tab -- it shows only directories in the current directory as a possibility. If no ...
2
votes
1answer
154 views

Install an additional completion function for bash

I have never used bash completion of todo.txt cli; however, I have decided to give it try. On the author's github, it says: (Optional, since v 2.9:) Install the Bash completion, either system-wide, ...
2
votes
1answer
172 views

When using zsh tab-completion, Ignore CDPATH if a local file or directory matches

I love Z shell's tab completion with CDPATH, but sometimes it's overkill. I'd like it to only kick in as a fall-back if nothing in the local directory matches. For instance, I was just in ~/Code/...
2
votes
1answer
104 views

How to make ZSH tab completion work with two tabs

I saw a question like this on here, but the answer didn't work for me. I'm trying to set up tab completion and I want it that if I have two files fileA and fileB and I type fil<tab> it first ...
2
votes
1answer
231 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 ...
2
votes
2answers
719 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 ...
2
votes
2answers
1k 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
0answers
49 views

Bash completion extra space when adding file directory

I have a script for extending bash-completion for certain commands. If I type command1 and do a tab, it should auto-complete with a file directory (and the files). It works fine expect for one ...
2
votes
0answers
37 views

How can I programmatically access zsh completion?

zsh has a completion system, activated by pressing tab: llama@llama:~$ git st<Tab> Completing main porcelain command stash -- stash away changes to dirty working directory status -- ...
2
votes
0answers
33 views

custom zsh autocomplete

I'd like to write a zsh completion for pytest. Where do I Start? I'm using oh-my-zsh. in .zshrc: fpath=($HOME/.mycompletions $fpath) autoload -U compinit && compinit -u in $HOME/....
2
votes
1answer
19 views

zsh auto completion certain parts of directory

I currently have zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' which will ignore the case when auto completing directories. However is it possible to type a certain part of the directory and ...
2
votes
0answers
40 views

Is it possible for bash/readline to “clean up” completion suggestions out the terminal?

If you are using zsh and do a tab completion for commands, pathnames, options etc, whenever there are multiple potential matches the suggestions will be displayed below the prompt. Once you chose a ...
2
votes
1answer
86 views

pmount hangs on BASH autocomplete

Whenever I try to use autocompletion in combination with pmount the terminal freezes until I abort via CTRL+C which leads to the autocompletion to actually be executed. Autocompletion works fine in ...
2
votes
0answers
53 views

Bash: redirect command argument completion [duplicate]

When you have written in the shell $ somecmd and double tab, you get all the suggestions that apply for that command. How can you redirect this output? I am aware of compgen, it seems to be able to ...
2
votes
1answer
149 views

getting case insensitive completions with compgen in bash

I'm trying to get my command (devmode2) auto-completing with bash working with compgen -W, my bashrc has: _devmode2() { COMPREPLY=() local sonames=$(devmode2 --auto --current "${COMP_CWORD}" -...
2
votes
1answer
151 views

Bash completion - How to get filename completion for suboptions

I have a function which can take main arguments and then sub-arguments. Some of these sub-arguments are filenames. The current completion code I have is as follows. _scm() { local cur prev opts ...
2
votes
0answers
365 views

Making zsh filename completion case-insensitive everywhere

I have the following line in my zshrc to make filename completions case-insensitive: zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' This works most of the time but I’ve noticed that if I ...
2
votes
1answer
606 views

zsh git command auto-complete add extra origin to the git branch name

After I clone a git repository locally, I want to switch branch to, says, 'ABCD'. $ git branch -a * master remotes/origin/ABCD remotes/origin/HEAD -> origin/master remotes/origin/master $ ...
2
votes
3answers
285 views

How to get tab completion when using curly braces in Bash

I want to have tab completion when using curly braces in a command in bash. For example: cp ~/html/{foo bar.txt whatever} /var/www/html/ I want the tab completion for the files stated in the curly ...
2
votes
0answers
35 views

Escaping output in tcsh completion by program

How do I escape output in the program providing completion? Suppose: tcsh% complete foo 'p/*/`mycomp`/' And mycomp is a Perl program printing this: #!/usr/bin/perl print "one\n"; print "two three\...
2
votes
0answers
192 views

Bash tabcomplete file names for environmental variable values

After I upgraded my Ubuntu from 12.04 to 14.04, bash would no longer let me tabcomplete file names when setting the value of an environmental variable, e.g. FILE=/home/_ _ is where I would press ...
2
votes
0answers
106 views

rlwrap-like tool with command autocompletion

I am often using rlwrap sqlite database.sqlite to browse an SQLite table. It works great but I would like to have a tool that would create an index tables (and possible its columns as well) and let me ...
2
votes
0answers
199 views

zsh autcomplete not updating path executables [duplicate]

Possible Duplicate: rebuild auto-complete index (or whatever it's called) After I install something via aptitude, zsh won't be able to find it until I search for it with which. For example ...
1
vote
2answers
186 views

Linux shell that allows you to choose from tab completion

This is an odd question, and I don't have a lot of information to provide but .. I recall seeing a Linux terminal that had a feature which allowed its user to choose between the options listed from a ...
1
vote
3answers
804 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 ...
1
vote
3answers
1k 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
2answers
2k 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 ...
1
vote
2answers
2k views

Tab auto completion doesn't work with apt-get install (kubuntu)

I've noticed a strange behavior of my shell on Kubuntu. Auto completion doesn't work well when I try to install new software. It works only for default commands (when I type "apt-get inst" and I press ...
1
vote
1answer
94 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?
1
vote
3answers
188 views

How to do command-line completion with files and folders

As a new Linux user, one of the things that's kept me away from the Command Line (CL) is that, for tasks involving files and folders (i.e. everything!), the amount of typing involved makes using the ...
1
vote
2answers
2k 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 ...
1
vote
1answer
25 views

How do certain commands change the tabbed autocomplete criteria?

Suppose I am in a directory like this: :mydirectory$ ls foo.txt That only file. If I type a command like cat and then I tab to autocomplete (assume the ‸ character is actually the caret ...
1
vote
2answers
37 views

Autocomplete hostnames when using SSH within history file

I'm looking for a feature that help me to autocomplete the servers I "sshed" in sometime and are in my .bash_history file without messing with known_hosts file or /etc/bash_completition, just grab ...
1
vote
1answer
35 views

How to stop bash being too smart restricting completion options?

I often come across bash getting in my way when I'm doing something like this: cmake -DCMAKE_INSTALL_PREFIX=/usr/<TAB><TAB> Apparently, bash doesn't see that cmake can accept paths and ...
1
vote
4answers
489 views

How do I store long hostnames list for SSH quick usage?

I have an SSH access to a lot of servers. And all that hostnames (and sometimes usernames) are long and hard to remember. Also even if I tweak my Terminal to keep eternal bash history, the using of ...
1
vote
1answer
395 views

How to have autocomplete ignore a specific completion

I've got auto-completion working for bash. When I type part of a program name, and then TAB, I get the full command. Works like expected, no complaints. However on my setup I've got an alias defined ...