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?
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…
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' \
…
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…
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…
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…
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…
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…
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
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…
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…
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…
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…
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…
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…