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)

5
votes
0answers
95 views
+50

Bash completion for comma-separated values

I would like to create completion rule for comma-separated parameters list. E.g. I have command which receives list of server names: myscript -s name1,name2,name3 At this moment I've managed to ...
0
votes
1answer
28 views

Zsh ssh tab completion not working as expected on OS X

I use Zsh on two different machines (OS X and Ubuntu) and the tab completion for ssh does not work the same way. More specifically hosts specified in the file ~/.ssh/config is NOT used on OS X but it ...
1
vote
0answers
42 views

how to edit and color bash's tab completion list

Following is what i would like to have. When the tab completion is ambiguous, and bash prints the list of possibilities. I would like it to colour the next character I should press inside every word ...
1
vote
1answer
60 views

Add arguments when completing a command name

I am looking for a way to expand some predefined strings in the terminal when tab (or another key combination) is pressed. This is different from tab completion. My terminal already expands ~ to my ...
4
votes
1answer
52 views

Force Bash normal tab completion if intelligent completion fails

Since tab completion became a standard feature in shells I have been a very happy user of it. I even like Bash's intelligent completion (where it only searches for PDF files, if I type evince ...
0
votes
1answer
30 views

ZSH autocompletion gives seemingly random errors after some time

My zsh autocompletion is broken in a strange way. For clean logins everything works but after some time I will get seemingly random autocompletion errors, for different "kinds" of autocompletion. ...
3
votes
0answers
45 views

Call vared and complete files from a different directory

I have the following zsh function which lets me edit symbolic links using the vared ZLE builtin. function lned { emulate zsh setopt err_return extended_glob local_options local_traps local -a ...
3
votes
1answer
42 views

Bash tab completion stop searching

When I am typing into bash and I press the "tab" key to auto complete, sometimes it takes a significant time. E.g., file IO to read directories takes >5 seconds, and thus I am hung waiting for IO to ...
1
vote
0answers
15 views

Manual tab completions in zsh

I would like nm[TAB] to expand to node_modules in zsh. Is this possible? How can it be done? Ideally, it wouldn't be triggered if there is another completion available, such as an already existing nm ...
2
votes
1answer
47 views

Completion of words on the screen as in VIM (Bash or Tmux)

How can I configure Bash or Tmux to complete the last matching identifier on the screen? Consider this common scenario: $ git fetch remote: Counting objects: 16, done. remote: Compressing objects: ...
3
votes
1answer
36 views

Show completions under the prompt in Fish

Is there a way I can get the ultra compact auto-complete function from Zsh in Fish, so If I press Tab it won't write me all the possibilities permanently into my terminal but underneath the prompt?
4
votes
2answers
233 views

Command completion does not complete the files in the current directory

Something is wrong with my tab completion. Let's say I do this: cd test // works fine, go into test directory ls // works fine, displays all of the files Let's assume I have the following files: ...
3
votes
1answer
51 views

compgen warning: -C option not working as I expected

What is the correct way to use the compgen -C option? I'm trying to learn about Bash programmable completion, and in particular the compgen builtin function. I'm experimenting with the different ...
6
votes
1answer
38 views

Zsh auto complete suggest complete functions (_git _vim etc)

I have a small annoyance with how zsh is doing complete suggestions for my commands. If I type the beginning of a command that I don't have installed and press tab it will suggest the completion ...
1
vote
1answer
27 views

How can I add autocomplete for “gem which” with rbenv?

I am using rbenv on Mac OS X. I have autocomplete functionality already for the gem command: $ gem build environment lock query stale cert fetch ...
1
vote
1answer
30 views

How to add all binaries to bash tab completion for some command?

I've installed program trickle that allow to throttle the net for specified command like: trickle -u10 -d10 <COMMAND> How to add bash completion for all binaries to trickle command?
3
votes
1answer
57 views

Tab completion of “../” in zsh

One noob question from a new zsh user: In bash, I can use tab-completion to move one directory up and descend down again another path. For example, suppose I'm in $HOME/folder1, and I want to cd to ...
1
vote
0answers
125 views

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

I just installed autojump. 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 installed to: ...
2
votes
1answer
77 views

Bash autocompletion for an environment variable holding a directory name

I'm using, among other things, bash 4.2.37 on Linux Mint 14. When I autocomplete the name of an environment variable by typing Tab, it expands to the name of the variable followed by a space. If the ...
2
votes
3answers
137 views

How to add pattern to bash completion (for unzip)?

When I type unzip <tab> I get a list of all files ending in .zip, which is the standard behavior of tab completion for the unzip command. However, I also want bash completion for unzip ...
2
votes
1answer
75 views

Zsh completion of hadoop commands

Hadoop has a range of commands and subcommands to specify different operations on MapReduce, HFS etc. (e.g. hadoop dfs can be followed by any command from this list). Is there any way to enable ...
3
votes
1answer
46 views

zsh completion and unknow bzr commands

ZSH's Bazaar completion does not offer any expansion/completion when it does not know the bzr subcommand I am using. In my case, I use bzr qlog but ZSH's /usr/share/zsh/5.0.2/functions/_bzr does not ...
3
votes
2answers
52 views

Guess complete filename

I have some files with really long names lying around on my server and writing the complete names is kind of a pita so I'm asking if my Linux system (Debian 7) can guess the complete filename? I want ...
3
votes
1answer
69 views

code review: automatic completion for bash aliases

I was reading How do I get bash completion for command aliases? and I thought, that the answer Shawn J. Goff needed a little something: less user setup so I wrote a little script that is intended to ...
4
votes
1answer
69 views

bash_completion for initscripts

I have writen my own initscript /etc/init.d/myscript. I can start and stop my script with the service command service myscript start service myscript stop When I type service <TAB>, ...
3
votes
1answer
48 views

How to cd open / autocomplete a folder that ends in a specific phrase

I have a folder with subfolders named like this: 1122334 important things 1122335 less important things 1122336 notes 1122337 pictures of kittens etc The numbers at the beginning are date codes. ...
1
vote
2answers
106 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 ...
2
votes
0answers
39 views

ZSH and completion of files with newline characters

I am experimenting with ZSH on nasty file names, especially file names with the newline character in it. Here is how I create them: $ touch "filename<hit return here> 1" $ touch ...
1
vote
1answer
67 views

How to globally enable all of Gentoo's bash completions at once?

eselect bashcomp enable unfortunately seems to lack a --all option, and I certainly don't want to manually activate each of the 194 entries. Can this be automated somehow, and set up such that ...
1
vote
1answer
134 views

FreeBSD csh, TAB to show available choices?

I am a newbie to FreeBSD. How can i configure csh or tcsh to show available choices by pressing TAB twice, just like bash?
3
votes
1answer
55 views

How can I get Bash to display the auto-completion definitions for a given command?

I use module command to load and unload stuff to my environment, some of the machines I use have proper auto-completion others do not. I'm wondering if I it possible to know where the completion ...
2
votes
2answers
51 views

Make zsh show autocomplete choices even when a possible match is entered

On my current system (openSUSE 12.3 with zsh 5.0.2) the autocomplete function does not give me a choice of possible completions if I have already entered a possible completion match. For example, if ...
4
votes
1answer
45 views

Zsh completion that is insensitive between `_` and `-`

I don't like typing underscores, and would like to type a dash instead, and have zsh autocompletion treat it like it could be either a dash or an underscore. Is this possible with built-in zsh ...
7
votes
1answer
85 views

Disable Bash autocompletion for a specific command only

Is it possible to disable Bash's autocompletion for a specific command only? Use case: For obvious reasons, I would like to disable autocompletion for the rm command when I'm root. It would also be a ...
1
vote
1answer
102 views

prevent bash completion from altering underscore variable $_

When using tab completion in bash, the $_ variable is altered: $ mkdir test $ cd <TAB><TAB> $_ bash: cd: -d: invalid option cd: usage: cd [-L|[-P [-e]]] [dir] (The ...
0
votes
4answers
143 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
47 views

How can I autocomplete each parameter in a different way?

I have a function called load_pg, which is defined like this: load_pg () { pg_restore --verbose --clean --no-acl --no-owner -h localhost -U $1 -d $2 $3 } And I'm trying to autocomplete each ...
1
vote
0answers
76 views

How can I reset the bash filename completion for “more”?

I've done something that has changed the way TAB auto-complete works, but only for the more command. Every other command lists the possible completions, but more now lists ALL of the possibilities ...
1
vote
1answer
69 views

Variable name completion in ksh

While I am in bash , I am able to do a tab complete with environment variable names, but with ksh I am not able to do so. How can I get it done with KSH? I am using mksh with cygwin.
10
votes
2answers
96 views

Cancel completion, but only completion, in zsh

When a completion function takes a long time, I can interrupt it by pressing Ctrl+C (terminal interrupt key, sends SIGINT) or Ctrl+G (bound to send-break). I am then left with the uncompleted word. ...
7
votes
3answers
234 views

Select unicode filename in Bash

Ok; suppose I'm in Bash and I have several files in a folder. Several of them are named file☠☡☢☣.txt, where ☠☡☢☣ starts with crazy untypable unicode characters. How would I refer to one of them? ...
5
votes
2answers
129 views

How to order files by date in tab completion list

$ 7z l ~/Downloads/Tab How to make the resulting list to be sorted by date, not by name? I currently use special script to list N most recent files in a given directory (and copy the filename ...
3
votes
3answers
111 views

Autocomplete newest file

I have a process which creates text files whose filenames are based on the timestamp of their moment of creation: $ ls 1378971222.txt 1378971254.txt 1378971482.txt 1378971488.txt 1378972089.txt ...
3
votes
2answers
45 views

Zsh completion for mounts (/run/media/DISK-LABEL)?

I am looking or zsh functionality to expand disk-labels into mountpoins: Example: I have disk with label DISK-LABEL1 mounted on /run/media/god/DISK-LABEL1. Is there a plugin which expands input ...
2
votes
2answers
70 views

Vim autocomplete to include punctuation between words

I'm currently programming in Tcl/Tk. I have some widgets called .entry,stdin and .entry,stdout and I'm using supertab for autocompletion. The comma is there because I'm using a package called gridplus ...
3
votes
1answer
204 views

Enable Bash-Completion to expand Superuser executables to full path

I'm running OpenSUSE 12.3 (and have seen the behavior since 11), and have found that I can't call Superuser programs (e.g. shutdown, reboot) without using the full path. For me, many of these ...
2
votes
0answers
54 views

Git completions for aliases only available after running `git reflog`

I have a few aliases that I want to autocomplete for git, e.g., the following alias gco="git checkout" When I was attempting to add completions for this alias, I looked around in my path and saw ...
1
vote
2answers
109 views

zsh expand-or-complete for all files regardless of command/context

zsh has a feature where command line tab-completion performs context-aware completions, so you can do things like: # Good: $ wget g<tab> # becomes: $ wget gopher:// $ wget --hea<tab> ...
2
votes
1answer
153 views

zsh adds tab character when autocompleting

I have zsh 4.3.10 installed on a RHEL 6.4 box. I'm not sure why this happens, but when I but Tab to autocomplete things, it also adds a tab character. For example: rocket@rhelbox www % vim vim ...
4
votes
1answer
172 views

Zsh completion, enabling shift-tab

When zsh shows you a menu of possible completions, I'd like it to let me use shift-tab to access previous completion entries--is there an option that controls what key is used to access previous ...