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
1answer
996 views

ZSH: insert completion on first tab even if ambiguous?

Currently ZSH displays a menu when I first hit tab and the completion is ambiguous. So, if I have 'cd ' in the command prompt and I hit tab, it will show the different available completions. If I hit ...
13
votes
3answers
2k views

How can I tell bash valid tab-completions for arguments to my Python script

Say I have a program hello.py and one possible valid argument to it is: ./hello.py autoawesomesauce Is is possible to type in: ./hello.py auto[tab] at which point the partially completed ...
3
votes
1answer
878 views

zsh equivalent of bash show-all-if-ambiguous?

In bash, if you hit tab when there are multiple possible completions you get a list of matches that keeps reprinting if you repeatedly press tab. In tcsh, setting autocomplete to enhanced also ...
3
votes
2answers
120 views

Hiding a zsh completion

I just switched to zsh (from tcsh) and have only run into one serious frustration: There are multiple completions for push — pushd and pushln. I’d really like to only have pushd available, since ...
5
votes
1answer
930 views

How do I get my shell functions to make use of existing autocompletion in zsh?

I have a couple of shell functions defined in my .zshrc which save on typing and allow integration with screen. For example: function s() { screen -t "$1" ssh "$@" } However, when I use these ...
3
votes
2answers
746 views

zsh alias expansion

Is it possible to configure zsh to expand global aliases during tab completion? For example, I have the common aliases: alias -g '...'='../..' alias -g '....'='../../..' but when I type for ...
19
votes
4answers
6k views

Command-line completion from command history

So, I've looked at history and at Ctrl+R, but they are not what I thought I knew. Is there a way that I can type in the beginning of a command, and cycle through the matches in my history with some ...
12
votes
1answer
2k views

Add arguments from previous command to zsh completion

In zsh (as well as bash) you can use some history word expansions to denote arguments from previous commands. This example shows getting the 2nd parameter from the previous command in history with ...
5
votes
1answer
2k views

TAB autocomplete in Bourne Shell

I don't know how to get the TAB key to autocomplete filenames, commands, or anything at all. I'm on a Unix-like system (OS/390) and depend on several scripts that work in sh (Bourne shell, not ...
23
votes
2answers
13k 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?
4
votes
1answer
879 views

When auto-completing in tcsh, can I reference a previous argument?

I'm trying to get some efficient auto-completing going here, and have hit upon a bit of a snag. I've got a command for setting two things at once. The first is a relatively small list, but the ...
18
votes
1answer
3k views

How do I get bash completion for command aliases?

I am looking to get tab-completion on my command line aliases, for example, say I defined the following alias : alias apt-inst='sudo aptitude install' Is there a way to get the completions ...
1
vote
0answers
198 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 ...
3
votes
1answer
1k views

ZSH to auto-complete directories in command-line arguments?

Transferred from regular StackOverflow... I'm a new ZSH convert on OSX (git status in the prompt was my main driver to make the leap). Everything seems to be working swimmingly but I'm missing ...
2
votes
1answer
578 views

ZSH autocomplete

How do I make zsh give me the autcomplete options but not fill in the prompt line with the first result? For example, this is the behavior I'm seeing: $ ifc{tab} $ ifcfg external command ifcfg ...
8
votes
1answer
941 views

Bash autocomplete in ssh session

It seems that bash doesn't want to autocomplete commands (what's annoying me right now is not autocompleting apt-get) when I'm logged into my machine from SSH. Is there some setting that will allow ...
31
votes
2answers
5k views

Rebuild auto-complete index (or whatever it's called) and binaries in $PATH cache in zsh

After installing new software, an already opened terminal with zsh won't know about the new commands and cannot generate auto-complete for those. Apparently opening a new terminal fix the problem, but ...
8
votes
1answer
3k views

How to specify a custom autocomplete for specific commands? [duplicate]

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 ...