tab-completion

Can a Bash tab-completion script be used in zsh?

落花浮王杯 提交于 2019-11-28 03:03:33
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 don't want to invest a ton of time in this, but if it's easy I'd save a moderate amount of effort. From this page (dated 2010/01/05): Zsh can handle bash completions functions. The latest development version of zsh has a function bashcompinit, that when run will

How to make PowerShell tab completion work like Bash

馋奶兔 提交于 2019-11-27 09:13:24
问题 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 ./buildBar.bat -- the first item in the list. In Cmd, the behavior is the same as PowerShell. I prefer the Bash behaviour - is there a way to make PowerShell behave like Bash? 回答1: New versions of PowerShell include PSReadline, which can be used to do

`ipython` tab autocomplete does not work on imported module

风流意气都作罢 提交于 2019-11-27 03:11:32
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. joaquin Be sure you have installed the pyreadline library. It is needed for tab completion and other IPython functions - in Windows it doesn't come with the IPython package and you have to install it separately - > pip install pyreadline Your ipythonrc file may be out of date. Try running ipython -upgrade pip told me I had pyreadline version

Accessing bash completions for specific commands programmatically

倾然丶 夕夏残阳落幕 提交于 2019-11-26 22:48:34
问题 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 get completions for specific commands: for instance, the input git p should display completion for git's commands. Is there any way I can use compgen to do this? If not, are there any other ways I can get a list of completions programmatically?

`ipython` tab autocomplete does not work on imported module

大兔子大兔子 提交于 2019-11-26 22:14:29
问题 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. 回答1: Be sure you have installed the pyreadline library. It is needed for tab completion and other IPython functions - in Windows it doesn't come with the IPython package and you have to install it separately - > pip install pyreadline 回答2: