Questions tagged [zsh-completion]

Questions about command completion in the zsh Unix shell.

Questions about command completion in the Unix shell.

Resources

243 questions
6
votes
0 answers

oh my zsh - compdef git plugin - why _git needed

Please see this line in the git.plugin.zsh file: compdef _git gdv=git-diff In the zsh user compdef tutorial, the compdef for referencing an existing command is explained like this: compdef cmd1=cmd2 The obvious question: why is _git needed?
Timo
  • 2,922
  • 3
  • 29
  • 28
6
votes
1 answer

Zsh: How to force file completion everywhere following a set of characters?

I'm trying to figure out how to get file completion to work at any word position on the command line after a set of characters. As listed in a shell these characters would be [ =+-\'\"()] (the whitespace is tab and space). Zsh will do this, but…
jan
  • 181
  • 2
  • 7
6
votes
1 answer

File completion priorities in ZSH

I have a shell pattern that marks some files as "boring" namely backup files, pyo files, vim backups, autogenerated directories and the like. Let's call it $BORING_STUFF. zstyle ':completion:*' file-patterns \ '%p:globbed-items' \ …
PythonNut
  • 6,182
  • 1
  • 25
  • 41
6
votes
1 answer

zsh completion according to a parameter

I am a quite a happy zsh user and especially appreciate its completion subsystem. Recently I am trying to enhance some completion commands especially those I use often (ex. rm). In zsh the following command: rm makes zsh complete with the…
user2414029
  • 71
  • 1
  • 5
6
votes
1 answer

Using zsh's compdef or compctl to complete a certain directory with _hosts for all commands

I use afuse to automount other hosts to my local file system with sshfs. Like so: afuse -o timeout=30 -o mount_template=sshfs -C %r:/ %m -o unmount_template=fusermount -u -z %m ~/remote/ This works great, but I would like to be able to…
Gurgeh
  • 2,130
  • 15
  • 28
5
votes
1 answer

Why is my zsh tab completion slow on commands but not directories?

I am using zsh with completion turned on. When I try to tab-complete, sometimes the command hangs for a long time. After a few seconds it completes and correctly presents my options. On the other hand, if I interrupt it with Ctrl-C, I get the…
javex
  • 7,198
  • 7
  • 41
  • 60
5
votes
2 answers

Changing the acceptance key (autosuggest-accept) - ZSH shell on mac

on > zsh mac terminal if i type c and get the autocompletion suggestion as clear To accept that suggestion i need to hit right arrow key and then press enter to run it. I want to change the right arrow key to something else for example ` OR ' Plese…
Chandan Nayak
  • 10,117
  • 5
  • 26
  • 36
5
votes
2 answers

Keybindings with ZSH

Can anyone tell me how to move back a word in ZSH? Ctrl+b will move back a character but not an entire word. For instance a log command like this: knife zero bootstrap mbigglesworth@10.10.1.108 --sudo-preserve-home --ssh-user mbigglesworth --sudo…
TyMac
  • 783
  • 2
  • 9
  • 32
5
votes
2 answers

zsh compadd - how to specify argument's description?

With _arguments I can do _arguments {-h,--help}'[Show help]', but how to specify 'Show help' message in compadd parameters? Cannot find that in documentation
Grief
  • 1,839
  • 1
  • 21
  • 40
5
votes
1 answer

zsh completion with virtual path

I want to create a zsh completion for a tool with a virtual file tree. e.g. my file tree looks like the following: / |- foo/ | |- bar | |- baz/ | |- qux |- foobar My tool mycmd has a subcommand for listing the current directory: $ mycmd…
tru
  • 51
  • 1
5
votes
1 answer

zsh compinit: insecure directories. Compaudit shows /tmp directory

I'm running zsh on a Raspberry Pi 2 (Raspbian Jessie). zsh compinit is complaining about the /tmp directory being insecure. So, I checked the permissions on the directory: $ compaudit There are insecure directories: /tmp $ ls -ld /tmp drwxrwxrwt 13…
jo12bar
  • 53
  • 6
5
votes
1 answer

How to force filename completion under oh-my-zsh?

The problem: Sometimes, when I try to do things in zsh, it won't complete the filenames I want because they don't apply to the current context. Two examples: I want to force-add a file which is currently ignored in hg or git. oh-my-zsh tries to…
Neil Traft
  • 18,367
  • 15
  • 63
  • 70
5
votes
1 answer

ubuntu 14.04 apt/aptitude autocompletion with oh-my-zsh not working

I've recently begun to use zsh with oh-my-zsh in a Ubuntu 14.04 server. The problem is that autocompletions of the debian plugin do not work, i.e. ai something does not autocomplete. Of course aptitude install somethi apt-get install…
ateam
  • 137
  • 1
  • 11
5
votes
1 answer

Why does zsh completion work for VBoxManage but not vboxmanage?

I have zsh-completions installed on arch linux. Completion of VBoxManage command seems to work fine, but vboxmanage doesn't (ie. just does simple completion of files int he local directory). Both VBoxManage and vboxmanage are symlinks to the VBox…
sw1nn
  • 7,278
  • 1
  • 26
  • 36
5
votes
1 answer

Using bash complete -C in zsh

Does zsh bash completion support complete -C 'custom command for completion' command? I had previously written a bash completion function in script, which I enable with complete -C 'tu --get-bash-completion' tu I'd like my colleagues who use zsh…
Thomas
  • 6,515
  • 1
  • 31
  • 47
1 2
3
16 17