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)

6
votes
0answers
244 views

zsh: how to fix tab completion so it doesn't hide entries?

I'm using oh-my-zsh on Mac OS X with homebrew'ed zsh 4.3.12. I stumbled recently on a weird problem. In scripts/not-used I have several .R files: breakdowns.R eventloop.R ...
4
votes
2answers
320 views

Saving tab completion possibilities to a file

Instead of displaying all possibilities on terminal screen, as in: $ ls /etc/<TAB> Display all 230 possibilities? (y or n) I want to save all possibilities to a file. ls /etc/ > file.txt ...
8
votes
6answers
372 views

How to disable emacs here document completion

When editing a bash script file with emacs, and trying to enter <<<, at the second < emacs insert a template for a here document, like in the following example: <<EOF EOF This is ...
3
votes
2answers
1k views

Tab autocompletion and history in tcsh

I use tcsh, and I'd like to set up the following behaviour, which I've seen on some systems in the past. If I type !string TAB then: If the history contains a unique entry beginning with string, ...
7
votes
1answer
233 views

compgen : ignoring case

I'm trying to implement a custom bash completion as described here. However, it seems that compgen is case-sensitive. Is there a way to turn it case-insensitive in that context ?
9
votes
2answers
2k views

Make BASH's Tab Completion Fill In First Match?

Is there any way to make BASH fill in the first match when I press TAB, kind of like the Windows command prompt? (It should still display the list of matches, but it should cycle through them when I ...
3
votes
1answer
677 views

is there a way to set coloring for cd tab complete?

I use ubuntu 11.04. Is there a way to set coloring for output after tab completion listing of a cd, ls, or etc. ? i.e. myshell@root$ cd ~/user/files/ I hit tab... myfile myfoo mybar <-- this ...
2
votes
2answers
717 views

ZSH tab completion: only complete files and not binaries

Is it possible to make a custom zsh completion file,so when hitting tab for filenames it avoids completing the binaries? For example,I have 2 files , myprogram.c and myprogram,the binary,is it ...
6
votes
3answers
1k views

Tab-completion for Mercurial in Bash?

Using Subversion on the command-line, it intelligently tab-completes available subcommands, etc: $ svn c<tab> cat checkout cl co copy changelist ci ...
3
votes
1answer
811 views

Bash and Tab Auto-complete

I recently put Fedora Core 15 on my system, and I've had a behaviour change that I can't figure out. Using Tab-Complete in the BASH shell works fine except when I use the $HOME variable. If I type cd ...
1
vote
1answer
152 views

_path_files and compadd ignore-files parameter

What is the format for the -F option of _path_files and compadd? I'm passing several directories to _path_files: _path_files -W "($base_directories)" -/ But some of those directory trees I don't ...
1
vote
1answer
295 views

How to have autocomplete ignore a specific completion

I've got auto-completion working for bash. When I type part of a program name, and then TAB, I get the full command. Works like expected, no complaints. However on my setup I've got an alias defined ...
9
votes
5answers
2k views

Weird Stuff in Terminal When I Hit Tab

For some reason, today, everytime I hit tab in the terminal this shows up: cat bash: warning: setlocale: LC_CTYPE: cannot change locale (en_CA) Display all 150 possibilities? (y or n) This ...
19
votes
3answers
2k views

How does TAB auto-complete find options to complete?

And how does it also autocomplete aliases?
3
votes
2answers
678 views

How to change the target directory for tab completion?

I found a short script to enable note-taking on onethingwell, which includes this: function n { nano ~/n/$1.txt } I'd like to extend it to do tab completion, so that if I want to edit the ...
3
votes
1answer
859 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 ...
11
votes
3answers
1k 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
817 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
118 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 ...
4
votes
1answer
821 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
668 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 ...
14
votes
4answers
4k 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 ...
10
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
1k 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 ...
18
votes
2answers
10k views

An easy bash completion tutorial?

I want to learn how to write bash completion scripts. Which tutorial would you recommend for a newbie?
4
votes
1answer
825 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 ...
16
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
197 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 ...
2
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
551 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
852 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 ...
29
votes
2answers
4k 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 ...