Questions tagged [zsh-completion]

Questions about command completion in the zsh Unix shell.

Questions about command completion in the Unix shell.

Resources

243 questions
761
votes
28 answers

zsh compinit: insecure directories

What does it mean and how can I fix it? zsh compinit: insecure directories, run compaudit for list. Ignore insecure directories and continue [y] or abort compinit [n]? Running the compaudit returns the follows: There are insecure…
Alex
  • 11,479
  • 6
  • 28
  • 50
185
votes
7 answers

Git tab completion not working in zsh on mac

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…
hamchapman
  • 2,901
  • 4
  • 22
  • 37
70
votes
4 answers

How to change zsh-autosuggestions color

I am new at zsh. I've installed the plugin zsh-autosuggestions in oh-my-zsh using instruction mentioned here. I am using Linux (Fedora 26). What my problem is I want to change the color of the text which comes in suggestion because the current one…
Vipin Yadav
  • 1,616
  • 1
  • 14
  • 23
54
votes
8 answers

Zsh Docker Plugin not Working

I have been using oh-my-zsh for a while now and the docker plugin as recently stopped working for me for some reason. I checked my ~/.zshrc file and the plugin is included plugins=(git colored-man colorize github jira vagrant virtualenv pip python…
Mikhail D'Souza
  • 583
  • 1
  • 4
  • 9
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
6 answers

ZSH auto completion for git takes significant amount of time, can I turn it off or optimize it?

Git's tab autocompletion is useful for small projects, but I'm currently working on two big projects that use git and for these it's worse than useless. Whenever I type, say, git add forms, git takes 20 seconds or more to find the file (in this…
haroba
  • 2,120
  • 4
  • 22
  • 37
27
votes
3 answers

cd -1, -2, -3 etc in Z shell

How do you set up the Z shell such that typing cd - gives you a list of previously visited paths, and cd -1, -2, -3, etc. will then take you to the directories?
invisiblerhino
  • 840
  • 1
  • 10
  • 18
24
votes
7 answers

How to enable command completion for Azure CLI in zsh?

I've found hints at there being command completion available for bash[1] for the Azure CLI (az command), but I have not found any indication on how to install/enable that for zsh. Anyone know how to do that, if it is possible? I use oh-my-zsh, if…
josteinb
  • 1,892
  • 2
  • 18
  • 32
21
votes
2 answers

Completion when program has sub-commands

I have written a command-line tool that uses sub-commands much like Mercurial, Git, Subversion &c., in that its general usage is: >myapp [OPTS] SUBCOMMAND [SUBCOMMAND-OPTS] [ARGS] E.g. >myapp --verbose speak --voice=samantha --quickly "hello…
Paul Ruane
  • 37,459
  • 12
  • 63
  • 82
20
votes
1 answer

How to list all zsh autocompletions?

In zsh, I'm trying to get an idea of which commands have an existing completion so that I can write completions for commands that don't. Is there a way to list the commands that zsh will complete without grepping the completion files? For instance,…
tegarri
  • 203
  • 2
  • 5
19
votes
2 answers

Where to place zsh autocompletion script on Linux?

After installing cheat (command cheat sheets from the command line), I tried to enable the autocompletion using the provided zsh script. However, I don't seem to find the correct location for the script. So far I fetch the cheat.zsh ; copy it to…
Édouard Lopez
  • 40,270
  • 28
  • 126
  • 178
19
votes
2 answers

Ignore ORIG_HEAD in zsh git autocomplete

I use oh-my-zsh and git autocompletion. If I type git checkout org and hit TAB I get these results: ORIG_HEAD origin/HEAD origin/mybranch How can I make the autocompletion to ignore ORIG_HEAD?
Lars Schneider
  • 5,530
  • 4
  • 33
  • 58
18
votes
2 answers

How to add custom git command to zsh completion?

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?
Sergiy Belozorov
  • 5,856
  • 7
  • 40
  • 73
17
votes
1 answer

zsh completion difference

I have seen many do this autoload -Uz compinit compinit and others do this autoload -U compinit compinit -i I would like to know the difference. which one should I use?
pvinis
  • 4,059
  • 5
  • 39
  • 59
16
votes
4 answers

Multi-dot paths in zsh, like `cd ....`

All shells understand these commands: $ cd . $ cd .. And zsh will also understand: $ cd ... $ cd .... Provided you say: $ alias -g ...='../..' $ alias -g ....='../../..' Now, how can I make it do proper tab-completion when I've started typing cd…
Tarrasch
  • 10,199
  • 6
  • 41
  • 57
1
2 3
16 17