tab-completion

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

早过忘川 提交于 2019-12-17 17:24:28
问题 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. 回答1: From this page (dated 2010/01/05): Zsh can handle bash

How to suggest files with tab completion using readline?

醉酒当歌 提交于 2019-12-12 10:45:08
问题 Within the Bash shell, I can use tab-completion to use suggest file and directory names. How can I achieve this with nodejs and readline? Examples: /<Tab> should suggest /root/ , /bin/ , etc. /et<Tab> should complete to /etc/ . fo<Tab> should complete to foobar assuming such a file exists in the current directory. I was thinking of using globbing (pattern search_term.replace(/[?*]/g, "\\$&") + "*" ), but is there maybe a library that I have overlooked? This is my current approach using glob,

Vim YouCompleteMe Python subclasses are not detected on TAB-completion in Arch Linux

寵の児 提交于 2019-12-11 16:29:59
问题 I can TAB-complete current open file variables, paths & globals, but my python subclasses are not detected on TAB completion. For instance, import os # os is built-in library. os. # ycm does not complete members of this class. It has been 48h that I'm searching the solution. My /usr/bin/python -> /usr/bin/python2.7, all the tests pass 100% and the build was successful. > uname -r 4.0.5-1-ARCH I tried installing packages specific to Arch Linux from repositories and they don't seem to work. At

Unable to make a tab completion file for MacPorts in Bash?

﹥>﹥吖頭↗ 提交于 2019-12-11 07:49:38
问题 I did not find by Google a tab completion file for MacPorts. It should not apparetnly differ much from the ones for Git and Django. How can you make a tab completion for MacPorts in Bash? 回答1: You can install the port bash-completion , as noted here. 来源: https://stackoverflow.com/questions/764476/unable-to-make-a-tab-completion-file-for-macports-in-bash

PyDev Remote Debugger and Tab Completion in Eclipse

筅森魡賤 提交于 2019-12-11 06:43:22
问题 This might be a limitation of the PyDev debugger but would anyone know how to enable tab completion and history like in a plain Python shell in the Eclipse debug Console window? Pressing tab or the arrow keys just jumps/moves the cursor. PyDev remote debugger is initialized as needed with following code: from pydevsrc import pydevd;pydevd.settrace('<my ip>', stdoutToServer=True, stderrToServer=True, suspend=True) 回答1: Did you check Preferences -> PyDev -> Editor -> Code Completion -> "Use

How to implement tab completion on the telnet client side

若如初见. 提交于 2019-12-10 19:23:34
问题 I have a server which opens a connections for a telnet client, like for example: I run the server ./server and in another window I run telnet client as telnet localhost 9999, as I run the telnet client, I will get new CLI prompt as CLI>>. From this prompt I need custom tab completion, but many of the blog says we can really dont have readline feature implemented on the telnet side, if so we have go for our own client. How do I achieve it? Any related help would be greatly appreciated. I am

Ignore a path entry with bash tab-completion

六眼飞鱼酱① 提交于 2019-12-10 03:00:43
问题 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 of foo-bar . It's obviously not much work to then just hit the space bar, but this interrupts my flow. Some additional details: foo and foo-bar are in the

How do I autocomplete nested, multi-level subcommands? [duplicate]

大兔子大兔子 提交于 2019-12-10 01:56:59
问题 This question already has answers here : Multi Level Bash Completion (2 answers) Closed 2 months ago . I am trying to develop an autocomplete or tab-complete feature for my own set of commands. For example, assume foo is my binary: CLI>> foo [TAB] [TAB] It should show the main commands configure and show . Then if I select configure , it should show the subcommands CM , DSP and NPU : CLI>> foo configure [TAB] [TAB] DSP NPU CM` I only know how to tab-complete and display for the first level -

Customize tab completion in shell

时光毁灭记忆、已成空白 提交于 2019-12-09 08:21:57
问题 This may be have a better name than "custom tab completion", but here's the scenario: Typically when I'm at the command line and I enter a command, followed with {TAB} twice, I get a list of all files and subdirectories in the current directory. For example: [user@host tmp]$ cat <TAB><TAB> chromatron2.exe Fedora-16-i686-Live-Desktop.iso isolate.py favicon.ico foo.exe James_Gosling_Interview.mp3 However, I noticed at least one program somehow filters this list: wine . Consider: [user@host tmp]

bash autocompletion: add description for possible completions

爷,独闯天下 提交于 2019-12-09 04:20:11
问题 Is it possible to make bash auto-completion look like in Cisco IOS shell? I mean to add short descriptions for each completion, like this: telnet 10.10.10. (TAB Pressed) 10.10.10.10 - routerA 10.10.10.11 - routerB where 10.10.10.10 and 10.10.10.11 are possible completions and routerA & routerB just descriptions (not to be executed). I know that bash can complete commands with "complete -W", but is it able to print descriptions for them? 回答1: I have a solution to this that does not require