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)

3
votes
2answers
342 views

Bash autocomplete variables for other commands than cd

I have env variable $SCRIPT. Normaly I can use autocomplete vim $SC<tab> and completion works as expected. On some systems it does not work. I have bash completion loaded, but completion in ...
1
vote
2answers
126 views

bash completion: how to complete a list of hosts for a specific argument?

My programm can have the following format: <command_name> <arguments> <options> -hosts <host1> <host2> ... <hostn> (<more_arguments>) ... I am trying to set ...
4
votes
1answer
93 views

How to use bash's complete or compgen -C (command) option?

When creating shell completion functionality in bash, it seems like the -C option would be powerful and common. It's defined like this: -C command command is executed in a subshell ...
3
votes
1answer
36 views

Why does path-completion in bash not always work?

With different bash-environments (different installations) I have different behaviors in terms of path-completion when hitting TAB on the command line after . Where is this handled? One specific ...
3
votes
1answer
196 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 ...
2
votes
1answer
113 views

Context-sensitive bash completion changes wildcard behavior

Somewhere along the way I've fallen into the habit of hitting tab twice after using a wildcard in commands like mv or rm, which by default causes bash to show the list of files that would match the ...
2
votes
1answer
128 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
1answer
478 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 $ ...
1
vote
1answer
48 views

Add trailing slash in bash completion of directory symbolic links

I have a symbolic link for a directory, e.g ln -s /tmp /xxx Now when I type /xx and press tab key, bash would complete the line to /xxx If I press it again it become /xxx/ Now, how can I ask bash ...
1
vote
1answer
38 views

Reset Bash's memory used for auto-complete

After renaming a file to a similar name, I noticed TAB was still completing the old filename (if it matched the letters so far) and not showing the new one. No matter how many letters I typed, it ...
1
vote
1answer
50 views

How to add a dir to fpath

I'm using zsh and prezto. I've adding the following line at the end of my .zshrc fpath=(/usr/local/share/zsh/site-functions $fpath) But unfortunately, the functions defined in this folder seems ...
1
vote
1answer
271 views

Custom tab-completion in bash's `read`

Is there a way to "import" a list of words into bash's read builtin to have custom tab-completion? I've been writing a wrapper script for suckless' minimalist irc client "ii", and I don't have a way ...
1
vote
1answer
342 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
230 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 ...
19
votes
0answers
607 views

How to combine zsh autocomplete for wrapper function arguments and existing command

I work mostly in gvim and many terminals. Originally, I preferred to open all my files in a single vim instance. To that end I used an alias to open files from my terminals in the current 'vim ...
10
votes
0answers
1k views

git completion with zsh: filenames with spaces aren't being escaped properly

Git completion: I'm having difficulty with git's filename autocompletions on my system. I'm using zsh (5.0.5) with git (1.9.3) on OS X (10.9.3). Both zsh and git have been installed via homebrew. ...
4
votes
0answers
202 views

Assign both menu-complete and dynamic-complete-history to TAB

Is there a way for me to assign both menu-complete and dynamic-complete-history to Tab (or one to Tab and the other to Tab-Tab) in .inputrc? I'm thinking there might be a way to setup a function and ...
3
votes
0answers
55 views

How to get bash tab completion to work with read only file system?

I have deliberately configured the file system of my RaspberryPi (Raspbian - Jessie) to be read only. One of the things that's not (yet) working is tab (aka auto) completion in bash, where I often get ...
3
votes
0answers
46 views

Calling zsh completion function and obtaining its results

I'm trying to make use of zsh's completion widgets in my own scripts. At one point I'd like have access to the result of every completion that is active in zsh, or rather I want to obtain the final ...
3
votes
0answers
26 views

How do I write a custom filename completer for specific directories in zsh?

I've found that file names with dates before the title are difficult to tab-completion. I'd like to write custom completion functions for these directories. How do I specify that the completer should ...
3
votes
0answers
178 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
0answers
226 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 ...
2
votes
0answers
32 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
0answers
333 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
0answers
32 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 ...
2
votes
0answers
179 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
98 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
42 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
0answers
73 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
0answers
13 views

Can I get zsh to include the directory stack in tab completion for tilde (~)?

I have autocd, autopushd and pushdminus enabled. When I try tab completion with ~: $ ~<Tab> avahi ftp mail redsocks systemd-coredump systemd-timesync bin gdm nm-openvpn ...
1
vote
0answers
23 views

Disable Oh-My-ZSH Completion of Beginning of Filename

I'm starting to use the directory stack in ZSH, but I've run into a problem. In an ideal directory, typing cd -<TAB> gives me the output of dirs -v. However, in some others (i.e. my Downloads ...
1
vote
0answers
23 views

How to have full completion in a run application dialog?

I've configured XFCE to execute gmrun as run dialog (Alt-F2). It works great with completion on commands but does not propose completion on arguments. How to set up a run dialog with full bash/zsh ...
1
vote
0answers
35 views

Bash tab completion not working within symlinked directory

I'm working with Bash 4.2.46 on RHEL7 with the bash-completion packages installed, but I seem to have found an odd corner case where tab completion doesn't seem to work as expected. I have a set of ...
1
vote
0answers
34 views

Can I clear an env var during bash completion?

I use bash completion from https://bash-completion.alioth.debian.org/ and some vendor supplied scripts too (eg. https://github.com/git/git/blob/master/contrib/completion/git-completion.bash) I also ...
1
vote
0answers
42 views

Bash completion: separately show results from different sources

I have followed this tutorial to write my bash completion function. It has worked out just fine, but I was wondering if it is possible to separately show completions from different sources. For ...
1
vote
0answers
67 views

Bash completion function for vim 'scp://' Paths

For easily editing remote files with vim, I currently use a few .vimrc and .bashrc additions to my environment. The bash-scripting side of it "misuses" the available standard _scp bash completion ...
1
vote
0answers
69 views

set -x doesn't print stack info for bash autocompletion

In my bash 4.2.46 and centos - 7.1.1503, I ran set -x (to print debug info). Now, if I type ls, it prints: + ls --color=auto a b c ++ printf '\033]0;%s@%s:%s\007' root sk-vbox '~' All well and ...
1
vote
0answers
51 views

How can I complete a -N numeric parameter?

I'm writing an autocomplete script for supervisorctl. Is it possible to complete a numeric parameter such as -6, -999 etc? Currently my call to _arguments looks like, which doesn't work: _arguments ...
1
vote
0answers
50 views

Autocomplete include directories in c++

VisualStudio has some extension which checks the include directories and makes suggestions while typing. My current project uses a lot of included libraries, sometimes with rather long pathnames. ...
0
votes
0answers
18 views

autocomplete in noexec mounted drive

I noticed that bash won't let me tab-complete executable files in a noexec file system. I'm assuming that in order for it to actually auto-complete, the file has to be within the PATH and at least ...
0
votes
0answers
12 views

Why is zsh seemingly ignoring no_list_beep?

I have zsh (5.1.1) on OS X (10.10.4), and am using oh-my-zsh with various plugins. When I type e.g. ls z in a directory with multiple items starting with z, zsh beeps and then displays an ...
0
votes
0answers
128 views

Strange Highlighting Color In ZSH Menu

I am using Arch Linux and zsh. When selecting options from a menu in zsh the color appears to be off when moving down in the list. For example after pressing the tab key twice after typing cd results ...
0
votes
0answers
57 views

vim no tab completion in bash

When in shell, running vim <anything> and pressing tab, doesn't auto complete or show the list of the available files. Although it auto completes for the directory names, but not the file names. ...
0
votes
0answers
97 views

Add slash suffix and not space for folder commands on bash auto-completion

What i expect my bash shell autocompletion to be like, % cd $HOM<TAB> -> cd $HOME/<CURSOR-HERE> What it does to me, % cd $HOM<TAB> -> cd ...
0
votes
0answers
163 views

busybox tab completion in vi mode

When I use busybox and switch editing mode to vi via set -o vi then tab completion stops working. When I switch back set -o emacs then tab completion starts working again. # set -o vi # ls -l ...
0
votes
0answers
315 views

My apt-get installer has no autocompletion for some packages

I have installed Kali Linux v1.1.0 (Debian based). Filename completion for sudo was not running at the beginning, so I added: complete -c sudo And everything seems to autocomplete now, except for ...
0
votes
0answers
65 views

Zsh - Modify File Completion w/ Quotes

I've been using Zsh recently, and when I complete a file name within quotes, the completion adds a space after the completed file name. Interestingly, this does not occur when I complete directory ...
0
votes
0answers
230 views

zsh completion doesn't correct ? (question mark) in paths

So, I've been pretty happy with my zsh completion and correction configuration for a while now, with this being a major exception. Configured as I have it, the shell routinely catches and corrects ...
0
votes
0answers
373 views

Unable to autocomplete ONLY when typing a make command

I'm running Ubuntu Linux 10.04. And I have the following in my .bashrc file: if [ -f /etc/bash_completion ] && ! shopt -oq posix; then . /etc/bash_completion fi I'm having a problem ...