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)

0
votes
0answers
12 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 ...
3
votes
1answer
49 views

Bash script - auto complete for user input based on array data

In a bash script I'm reading some user input with read. Now I want to provide the possibility to auto-complete the input by hitting the Tab key. Easy example: Let's say, the user shall type in a name ...
4
votes
3answers
941 views

How do I let bash autocomplete wildcards?

If I have directory containing the files foo.bar.a.cat foo.bar.a.hat and I type ls f+TAB the bash shell autocompletes to ls foo.bar.a.. If I type ls *bar*+ TAB I would like it to autocomplete to ...
1
vote
1answer
11 views

Can I selectively disable zsh completions?

I'm using prezto with zsh, and find it a little slow to launch a new shell. (N.B. I'm attempting to optimise on a fast-ish system, before moving my configuration to other, slower systems.) ...
3
votes
1answer
26 views

zsh: menu completion for glob

In zsh, if I type vim *.txt then Tab, it expands to vim f1.txt f2.txt f3.txt. How can I make it show a completion menu listing files matching the pattern, so I can select a single file?
11
votes
2answers
3k views

Zsh completion of brew formulas

In OS X, is there any way to have Zsh (I'm using Oh-my-zsh) tab-complete formulas? E.g. $ brew install em<TAB> could expand to: $ brew install emacs
3
votes
1answer
46 views

Why does nullglob affect tab completion?

After shopt -s nullglob, I noticed that tab completion completely stopped working. Why would that be? extglob is apparently benign, what else could nullglob affect? Observed on: Ubuntu 14.04 (bash ...
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 ...
2
votes
1answer
95 views

Directory stack order discrepancy in zsh

I am working on Zsh 5.0.2 (latest stable version), and I noticed that: dirs -v and cd -<TAB> show a different list of directories (or at least directories in different order). Moreover, ...
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 ...
10
votes
1answer
6k views

How to specify a custom autocomplete for specific commands?

Is there a way to have bash know exactly what to display when you double tab? For example I have a python script scpy which requires a couple arguments. For example like apt-get, if you double tab ...
3
votes
1answer
49 views

Is there a way to use regex expressions to auto-fill filenames in bash?

Assuming I have a directory with files as shown: $ ls file0001.txt file0002.txt file0003.txt file0004.txt file0005.txt someotherfile.txt Lets say I want to run the following command: $ cat ...
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 ...
50
votes
2answers
33k views

An easy bash completion tutorial? [closed]

I want to learn how to write bash completion scripts. Which tutorial would you recommend for a newbie?
2
votes
2answers
76 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 ...
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 ...
3
votes
2answers
43 views

Bash completion for user without access to /etc

I'm using a Chromebook (with a developer mode enabled), and as someone of you may know, there is no write access to the system directories (including /etc/). I'd like to enable the bash-completion ...
5
votes
1answer
57 views

What's the relevance of these bash completion suggestions?

~ is $HOME. For me, cd ~ is /home/cat. Simple so far, yes? In Bash, the following happens: cat @ mint-kitty : ~/Downloads $ cd ~ # from /home/cat/Downloads to /home/cat/, as an example, but ...
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 ...
3
votes
1answer
29 views

rlwrap: tclsh multi-word autocompletion

How do I get multi-word autocompletion with rlwrap for tclsh? Example: I type file <space> then pressing <tab> <tab> I only want to see the sub-commands to file, such as exists ...
4
votes
1answer
40 views

Use same colors in bash tab complete and ls [duplicate]

Bash is using a different color for tab completion than ls. For example, my ls command uses a red color for a broken symlinks (I'm using dircolors to configure it), but if I use ls Tab, the color is ...
0
votes
2answers
25 views

Why isn't the tab-key autocompleting under Xfce4?

I have a big problem under Xfce4, namely when I try to start a program using alt+F2, I'll start typing xfce4-terminal and before I finish it, it suggests the end of the sentence--but usually you ...
1
vote
1answer
50 views

Bash Autocompletion - Insert words in commands

I know that linux bash has autocompletion feature when TAB is pressed and it will show possible completions just below the command. My question is how can you update autocomplete feature so that in ...
1
vote
1answer
34 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 ...
5
votes
1answer
685 views

Can the command completion for `cd` be modified to only show directories and ignore files?

When I am in a directory in bash, and I press cd Space Tab, it shows everything in the directory as a possibility. (Show all 1000 possibilities?) This is really cumbersome when I am in a directory ...
1
vote
1answer
41 views

Clever complete of .c and .o

I would like that bash completes my command vim myPrTab to vim myProgramName.c even if the current folder also contains a file called myProgramName.o, since 99.9% of the time I want to open the source ...
1
vote
2answers
156 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 ...
3
votes
1answer
33 views

zsh: Tab completion for function with Git commands

In zsh I am using the following function to delete a local and a remote branch with one command: gpDo () { git branch -d "$1" && git push --delete origin "$1" } Currently, ...
0
votes
0answers
22 views

Why is my tab complete running slowly [duplicate]

I've recently noticed that the tab complete in my terminal is running rather slowly (maybe 1-2 seconds but it used to be a lot quicker, and it's quite annoying as I tab complete a lot). I used another ...
0
votes
1answer
43 views

Why is there an upper limit to tab completion's “display all 3197 possibilities?”

I have a directory containing many (.pdb) files--9917 of them. I wanted to count them to make sure that they were all there (the download said there would be 9917). When I cd into the directory and ...
2
votes
1answer
51 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 ...
1
vote
1answer
69 views

Bash completion for `unrar`

When bash-completion is loaded, unrar x completes after pressing tab to RAR-archives in the directory. But for multipart archives with the new naming convention, like Filename.part01.rar ...
1
vote
1answer
15 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 ...
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 ...
14
votes
4answers
11k views

Autocomplete server names for SSH and SCP

I have a few servers configured in ~/.ssh/config, such as alpha and beta. How might I configure Bash such that the commands ssh al<tab> and scp file.tgz al<tab> autocomplete the names of ...
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 ...
5
votes
2answers
1k 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 ...
1
vote
0answers
14 views

How to pipe bash completion suggestions? [duplicate]

I am trying to save bash completion suggestions to use them. So, I am trying to simulate two tabs and pipe the result to something else. I am looking for something like: $ getCompletions git ...
2
votes
2answers
159 views

bash completion very incomplete on centos 7

I have installed bash completion using yum install --enablerepo=epel bash-completion. While it works for some basic commands (git & yum), I am missing a large part of the completers. My ...
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 ...
1
vote
1answer
3k 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?
2
votes
1answer
36 views

Is it possible to configure bash to autocomplete with one tab like zsh?

As most people here know, when using bash at the command prompt if you partially type a file name a command or an option to a command etc, bash will complete the word if there is exactly one match. ...
1
vote
1answer
98 views

sudo: nocorrect: command not found

I am using zsh and oh-my-zsh on Arch Linux. I am not able to make directory using mkdir edward@ArchLinux ~ $ sudo mkdir -p /samba/raspberry [sudo] password for edward: sudo: nocorrect: command ...
4
votes
1answer
30 views

Prevent customized bash autocomplete from affecting io redirection (< and >)

I've used complete -W 'firstdatabase databasetwo etc' mysql to save a list of databases, so that I can autocomplete them using the mysql command. However, in many cases I would type mysql db < ...
12
votes
2answers
9k views

How to debug and fix slow autocomplete in bash?

After a recent update (Ubuntu 12.04 LTS), TAB complete on the command line is slow. After entering a partial command (e.g evi [TAB]) or partial filename (e.g. evince somedocu[TAB]) the shell, ...
1
vote
1answer
97 views

Implement a shell in a bash script [closed]

I am trying to emulate a shell in a bash script, like this: cmd_shell() { while true; do read -e -p 'pass> ' command run_cmd $command done } It works ok, and the option ...
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 ...
2
votes
1answer
45 views

Automatically add slash when navigating through symlink

I use symlinks a lot and pretty much linked my whole home directory into a folder .other or .dotfiles. When I'm im my home directory and try to got into the folder .config/, its actually a symbolic ...
2
votes
2answers
49 views

Autocomplete from grep output

How might I more easily use a filename found by grep as an argument to vim: $ grep -r foo * lib/beatles/john.c lib/pantera/phil.c lib/pinkfloyd/roger.c lib/pinkfloyd/richard.c ...
5
votes
1answer
963 views

Combining zsh’s tab completion with case insensitivity

I have zsh 5.0.7 configured to use case-insensitive tab completion with zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' The problem I’m having is that this case insensitivity often leads ...