zsh-completion

How to enable git file tab completion with zsh compinit?

匆匆过客 提交于 2021-02-17 19:12:06
问题 I have a problem with the zsh tab completion: After running: autoload -U compinit compinit Git tab completion for files does not work any more. For example if I type git add my_f to complete my_file, nothing happens. The zsh git completion only seems to work for git branches and tags. Without the compinit stuff, git file completion works, but of course I'm missing out all the fancy branch completion stuff. So... Is there a way to make git file completion AND git branch completion possible at

How to enable git file tab completion with zsh compinit?

醉酒当歌 提交于 2021-02-17 19:12:05
问题 I have a problem with the zsh tab completion: After running: autoload -U compinit compinit Git tab completion for files does not work any more. For example if I type git add my_f to complete my_file, nothing happens. The zsh git completion only seems to work for git branches and tags. Without the compinit stuff, git file completion works, but of course I'm missing out all the fancy branch completion stuff. So... Is there a way to make git file completion AND git branch completion possible at

How to enable git file tab completion with zsh compinit?

谁说胖子不能爱 提交于 2021-02-17 19:11:53
问题 I have a problem with the zsh tab completion: After running: autoload -U compinit compinit Git tab completion for files does not work any more. For example if I type git add my_f to complete my_file, nothing happens. The zsh git completion only seems to work for git branches and tags. Without the compinit stuff, git file completion works, but of course I'm missing out all the fancy branch completion stuff. So... Is there a way to make git file completion AND git branch completion possible at

Git tab completion not working in zsh on mac

不问归期 提交于 2020-11-30 02:45:09
问题 No matter what I try and do I can't seem to make git tab/auto completion work in my zsh shell. I've downloaded the bash-completion script and the zsh-completion one and followed the instructions, but I can't make it work. I've reinstalled oh-my-zsh but that didn't seem to help or make any difference. Can anyone who's got it working describe to me their setup so I can try an emulate it to get it working for me? To be specific, what I've done so far is: Switched to using zsh as my default shell

Git tab completion not working in zsh on mac

妖精的绣舞 提交于 2020-11-30 02:44:23
问题 No matter what I try and do I can't seem to make git tab/auto completion work in my zsh shell. I've downloaded the bash-completion script and the zsh-completion one and followed the instructions, but I can't make it work. I've reinstalled oh-my-zsh but that didn't seem to help or make any difference. Can anyone who's got it working describe to me their setup so I can try an emulate it to get it working for me? To be specific, what I've done so far is: Switched to using zsh as my default shell

How to add custom git command to zsh completion?

荒凉一梦 提交于 2020-06-09 12:02:08
问题 I've read a few guides on zsh completion, but I am still confused. In our development environment we have a custom Git command called git new-branch . I'd like zsh to auto-complete it for me after typing just git ne and a Tab . How can I do that? 回答1: The default git completion is extendible: Say you got your own git sub-commands (git will run a program `git-foo' when you run "git foo") and you want "git f" to complete that sub commands name for you. You can make that sub-command known to the

Restricting zstyle completion to functions in a zsh plugin

巧了我就是萌 提交于 2020-04-18 05:44:17
问题 I want to add smart completion to a custom Oh My Zsh plugin. Presently, the plugin contains >150 functions like this: qq-enum-dns-txfr-host qq-enum-dns-brute-rev qq-enum-dns-tcpdump qq-enum-web-php-lfi-logfile qq-enum-smb-tcpdump qq-enum-web-php-ffuf-common-php qq-enum-ftp-tcpdump This answer helpfully explained how to get e.g. qq-tcp Tab to complete to the three tcpdump options. This works: zstyle ':completion:*' matcher-list 'r:|[-]=**' However, setting this in the plugin overwrites the

Completing command name itself in zsh

Deadly 提交于 2020-03-23 12:02:43
问题 I have a bunch of ZSH functions which are pretty verbose, and I'd like to use zsh completion on them. Example: qq-enum-dns-txfr-host qq-enum-dns-brute-rev qq-enum-dns-tcpdump qq-enum-web-php-lfi-logfile qq-enum-smb-tcpdump qq-enum-web-php-ffuf-common-php qq-enum-ftp-tcpdump When I type qq-tcp Tab I'd like to get completions of: qq-enum-dns-tcpdump qq-enum-smb-tcpdump qq-enum-ftp-tcpdump All the documentation I can find deals with how to complete arguments to a given command or function, but

Zsh tab completion duplicating command name

南楼画角 提交于 2020-01-22 04:48:13
问题 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 example: $ brew {tab} will result in: $ brew brew [list of homebrew commands] I'm unsure what is causing this error, as when I resize the terminal window, the first instance of the command name disappears. If I hit backspace when the duplicates are

Zsh tab completion duplicating command name

你离开我真会死。 提交于 2020-01-22 04:48:10
问题 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 example: $ brew {tab} will result in: $ brew brew [list of homebrew commands] I'm unsure what is causing this error, as when I resize the terminal window, the first instance of the command name disappears. If I hit backspace when the duplicates are