Questions tagged [tab-completion]

Most shells provide tab completion where a user can type part of a command or file name, and then press tab to make the shell complete the command. This saves greatly on the number of key presses needed when working on the command line.

359 questions
194
votes
8 answers

How to make PowerShell tab completion work like Bash

Let's say I have the following files in my current directory: buildBar.bat buildFoo.bat buildHouse.bat And I type the following at my command prompt, ./bu and then TAB. In Bash, it gets expanded to ./build In PowerShell, it gets expanded to…
RobSiklos
  • 8,348
  • 5
  • 47
  • 77
109
votes
6 answers

Can a Bash tab-completion script be used in 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…
Coderer
  • 25,844
  • 28
  • 99
  • 154
106
votes
19 answers

`ipython` tab autocomplete does not work on imported module

Tab completion on IPython seems not to be working. For example, import numpy numpy. simply adds a tab. import numpy num just adds a tab, too. Could you please suggest some possible causes for this problem? I am running Windows 7 and…
djpark121
  • 1,191
  • 3
  • 10
  • 5
71
votes
19 answers

TAB completion does not work in Jupyter Notebook but fine in iPython terminal

TAB completion works fine in iPython terminal, but not in Firefox browser. So far I had tried but failed, 1). run a command $ sudo easy_install readline, then the .egg file was wrote in…
62
votes
3 answers

How to enable auto completion in Ruby's IRB

When I use Merb's built in console, I get tab auto-completion similar to a standard bash prompt. I find this useful and would like to enable it in non-merb IRB sessions. How do I get auto-completion in IRB?
John F. Miller
  • 26,961
  • 10
  • 71
  • 121
57
votes
2 answers

Custom tab completion in python argparse

How to get shell tab completion cooperating with argparse in a Python script? #!/usr/bin/env python import argparse def main(**args): pass if __name__ == '__main__': parser = argparse.ArgumentParser() …
wim
  • 338,267
  • 99
  • 616
  • 750
38
votes
3 answers

Tab completion for aliased sub commands in zsh: alias gco='git checkout'

I have an alias: alias gco='git checkout' How can I add tab completion as if I had typed git checkout? For my alias g='git' I use compdef g='git'. I've been trying to use compdef but I've not had any success.
33
votes
6 answers

AWS CLI command completion with fish shell

Has anybody been able to set up auto-complete for the AWS CLI with fish shell? The AWS documentation only offers the guide for bash, tcsh, and zsh. Bash exports the variables COMP_LINE and COMP_POINT that is used by the aws_completer script provided…
Osi
  • 331
  • 3
  • 5
30
votes
2 answers

How to Implement Tab Completion

I'm trying to figure out how to implement tab completion for subcommands in a C++ application. I would like it to function much like Git's tab completion. I'm trolling through Git's source, but it's not jumping out at me. I've searched for ways to…
E-rich
  • 9,243
  • 11
  • 48
  • 79
30
votes
6 answers

Zsh tab completion duplicating command name

I'm on OS X Mountain Lion, running the included ZSH shell (4.3.11) with Oh-My-ZSH installed over the top. When using tab completion with commands such as homebrew, when ZSH lists the available commands, it is also duplicating the command. For…
Jamie
  • 3,890
  • 3
  • 26
  • 35
29
votes
3 answers

function name + tab does not return docstring in IPython

In IPython, I am used to write function( and then strike a tab, and get the contents of the docstring and a list of the named arguments. However, this stopped working since I installed IPython 2.0. Is there an explanation or a know fix?
dmvianna
  • 15,088
  • 18
  • 77
  • 106
28
votes
2 answers

Vim case-insensitive filename completion

I recently noticed how to configure bash to do case-insensitive filename completion (in /etc/inputrc, add: set completion-ignore-case on), now how do I get this in vim?
Vincent Scheib
  • 17,142
  • 9
  • 61
  • 77
26
votes
4 answers

Accessing bash completions for specific commands programmatically

I'm trying to write a small command launcher application, and would like to use bash's tab completions in my own completion system. I've been able to get a list of completions for general commands using compgen -abck. However, I would also like to…
Donald Harvey
  • 917
  • 8
  • 23
24
votes
2 answers

zsh: use completions for command X when I type command Y

In zsh, I have a function called g which acts like this: with no arguments, call git status with one or more arguments, delegate to git with all given arguments - i.e. call git $@ I would like the tab completions for g to be exactly the same as…
gfxmonk
  • 8,614
  • 5
  • 42
  • 53
24
votes
3 answers

How can I provide tab completions to fish shell from my own script?

I am running Ubuntu 13.10 and fish 2.1.0. I want to write myself a Python script to do some tasks from the command line. The script will require command line arguments. How can I write my script such that fish can request and get possible values for…
lofidevops
  • 15,528
  • 14
  • 79
  • 119
1
2 3
23 24