tab-completion

IPython tab completes only some modules

I'm using the EPD version of python and IPython. After installing some modules using easy_install I notice that, although they can be imported, they cannot be tab completed. They exist on the path but, while included modules (pylab, readline, math) can be completed, these new modules cannot. Anyone know what I should look into to find t...

How to do brace expansion tab-completion, for filenames in vim?

In vim (and bash), you can specify alternatives in filenames, eg: :arga project/html/{index,sitemap}.html This expands to "project/html/index.html" and "project/html/sitemap.html" (the :arga appends them both to the argument list; you can get to them with :n). Now, vim already does some filename completion on this, with TAB, by cycli...

Emacs: Tab completion of file name appends an extra i:\cygwin

I am facing some strange behavior with file-name completion in emacs. C-x C-f to find file opens up the minibuffer with i:/cygwin/home/rrajagop/StockScreener/working_copy/master_repo/stock_screener/. Hitting a TAB makes it i:/cygwini:/cygwin/home/rrajagop/StockScreener/working_copy/master_repo/stock_screener/. A couple of interesting thi...

Tab-completion of filenames as arguments for MATLAB scripts

We all know MATLAB provides tab-completion for filenames used as arguments in MATLAB function like importdata,imread. How do we do that for the functions we create? EDIT: Displays the files and folders in the current directory. ...

Bash Completion: What can we do with it, what lies in the future.

Bash lets you complete commands names and names of files in the arguments with the TAB key. But why not also common options to commands? Why not, even better, a completion system that tells you what an option does, too? I heard of programmable completion.. but don't understand where it fits.. So my question is: is there a way to achiev...

Tab completion with Python's Cmd.cmd

After testing a while with the Cmd.cmd framework in python, I noticed a problem I don't know what to do about. Plus I believe to have this working some hours before (or I'm just crazy), so this is even more weird. I have the following example code, tested on both Windows and Linux systems (so it's not a Windows problem), but tab complet...

Tab Completion in Python Command Line Interface - how to catch Tab events

I'm writing a little CLI in Python (as an extension to Mercurial) and would like to support tab-completion. Specifically, I would like catch tabs in the prompt and show a list of matching options (just like bash). Example: Enter section name: ext*TAB* extensions extras The problem is I'm not sure how to catch the Tab ev...

Ignore a path entry with bash tab-completion

I have two commands, foo and foo-bar, where foo is a symlink to foo-bar. I want to be able to type f+TAB (pretend these are the only two commands on the path that begin with f) and have one of them be completed (meaning the full name and the space after). What ends up happening though is that it completes to just foo (no space) because ...

How to get auto-completion in Emacs to start completion automatically and on press of button.

I am using the auto-completion elisp for emacs. I am currently using it by pressing M-TAB but I would like it to also auto-complete after 4 characters. I use yasnippet as a source for auto-complete so if I set it to auto-complete after 4 characters it won't show completions like if, for, inc, main. If I set it to start auto-completion ...

How do I set environment variable completion in a bash shell on mac

In a bash shell on linux, if I type: echo $DISP and hit tab, it completes to: echo $DISPLAY It doesn't work in bash on OSX 10.5, and I'm using the same .bashrc Is there a shell option or setting I can use to set this. ...

How to limit the subset of git commands that zsh will auto-complete (with tab)?

I have a combination of: autoload -Uz compinit compinit and autoload -Uz vcs_info It actually allows for a great amount of integration between git and zsh's tab completion. Too much in fact. How do I limit the set of commands, so that git che(TAB) will expand to checkout, and not to a choice between checkout and checkout-index? ...

Unix file naming convention for effective tab completion?

I feel like I often name files in such a way that my computer constantly beeps while I program because the tab completion is ambiguous. Before doing a lot of Unix programming, I tended to name related files with the same prefix to indicate their relation. Now I must re-think my approach to folder and file structures and names to program ...

How to remove the file extension in a zsh completion?

I want to adjust zsh so that I can tab complete: myprog <tab> using all *.foo files in ~/somedir, but have it so that it displays them without the .foo extension. Is there any way to do this? This is what I have so far: #compdef myprog typeset -A opt_args local context state line local -a mydirs mydirs="(. ~/somedir)" _arguments -...

IPython tab completion not working

Tab completion on IPython seems not to be working. For example, import numpy numpy.<tab> simply adds a tab. import numpy num<tab> just adds a tab, too. Could you please suggest some possible causes for this problem? I am running Windows 7 and Python 2.6.5. ...

How to bundle bash completion with a program and have it work in the current shell?

I sweated over the question above. The answer I'm going to supply took me a while to piece together, but it still seems hopelessly primitive and hacky compared to what one could do were completion to be redesigned to be less staticky. I'm almost afraid to ask if there's some good reason that completion logic seems to be completely divo...

bash completion for Subversion

I've tried to load bash_completion in my bash (3.2.25), it does not work. No message etc. I've used the following in my .bashrc if [ -f ~/.bash_completion ]; then . ~/.bash_completion fi I also tried to use .bash_profile instead, but with the same result. So the problem is why does it not work? Any idea? Hints? ...

How to define your own terminal tab completions

I've noticed that some programs have their own tab-completion. For example, git: git checkout allows for tab completion of branch names. How is this accomplished? ...

readline-like library for Java

Which readline-like library for Java do you use? By 'readline' like library I mean library for editing console input, with support for history, tab-completion, and stuff like this. I'm looking for one, and I cannot choose from so many choices (jLine -- unmaintained, java-readline -- last release on 2003, others?) ...

powershell.exe tab completion - list alternatives?

I've never really used PowerShell before, and playing with it a bit, it looks like it uses cmd.exe's style of tab completion (fill in the first likely candidate, and then you can use tab to cycle through other alternatives). I'd much prefer the way e.g. bash works, where if there are multiple candidates, it shows a list of them. Is ther...

I have a bash-tab-completion script. Is there a simple way to use it from zsh?

I have a bash-tab-completion script for Apache's Hadoop. Normally, I use zsh as my day-to-day shell. It tends to be pretty bash-like when I need it to be, but it looks like the tab-completion systems are radically different between them. Is there a simple way to "convert" the existing bash-tab-completion definitions to work in zsh? I...