a feature provided by interactive programs such as shells and text editors that inserts text in order to complete a word or phrase that the user is likely intending to compose

learn more… | top users | synonyms (2)

2
votes
1answer
605 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 ...
14
votes
2answers
4k views

An easy bash completion tutorial?

I want to learn how to write bash completion scripts. Which tutorial would you recommend for a newbie?
7
votes
3answers
456 views

How to pipe the list of commands displayed by of “tab complete”?

When using commands in bash I like the double tab option to display the available commands. Some commands have more possible matches than others: Is there a way I can pipe the output of the double ...
10
votes
1answer
2k 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 ...
4
votes
3answers
862 views

How can I expand a relative path at the command line, with tab completion?

In bash is there any way to expand a relative path into an absolute path, perhaps with tab completion? I ask because sometimes I will search for a file, find it, then vim it: cd /etc cd apache2 cd ...
21
votes
2answers
2k views

rebuild auto-complete index (or whatever it's called)

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, ...
15
votes
3answers
2k views

scp: How to Enable Autocompletion for Remote Paths?

I remote copied a file to my laptop using: scp someFile USER@192.168.178.32:/home/USER/put/it/some/where/oh/damn/you/here I am too lazy for this! I want to be able to autocomplete the remote path ...
6
votes
1answer
978 views

Terminal autocomplete: cycle through suggestions

I had this on my Ubuntu setup and since I switched to Fedora I want to set it and I forgot how... The idea is simple : I don't want the terminal to show me suggestions when I double tab, instead I ...
17
votes
3answers
1k views

How does TAB auto-complete find options to complete?

And how does it also autocomplete aliases?
7
votes
1answer
271 views

How to output string completions to stdout?

Some of the git commands have many options, and it would often be useful to search through them for the one I need - I was just looking for the option which controls the TAB width in git-gui, but ...
3
votes
1answer
47 views

Bash remote autocompletion : change the 'starting' directory

I'm regularly downloading files from a remote server, always from the same directory. So I wrote a custom function that I put in my bashrc: download_from_myserver () { for file in "$@" do ...
3
votes
2answers
262 views

How to enable tab completion of wildcards in bash?

How can I enable tab completion in bash for a statement such as vim db/migrate/*crea? Essentially I am looking for tab completion to match the regular expression and present the options. How would ...
5
votes
1answer
200 views

zsh - fully expand binary path on <tab>

In my current zsh behaviour, hitting tab after typing "sudo" just adds a space. $ sudo ... What I really want is for the tab to fully expand to the path of the binary it is about to execute when I ...
2
votes
1answer
119 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 ...
1
vote
1answer
407 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 ...