I have written a little shell script called mgit that executes the same git command in multiple repositories. I would like to tell zsh that arguments to mgit should be completed like git arguments.
For example, I can type git st and hit tab, and…
I've build a command line tool and I need to complete arguments with zsh. I never wrote a zsh completion function so I looked in the scripts provided with zsh but I missed something so that it could work properly.
So, mytool can take a variable…
I am trying to follow Make zsh complete arguments from a file but with a command. Shouldn't matter much.
In /usr/local/share/zsh/site-functions/_foo I have
#compdef foo
aliases=($(a complicated command here printing everything twice))
_describe…
I am writing a zsh completion function to complete IDs from a database. There is a program listnotes which outputs a list like this:
bf848bf6-63d2-474b-a2c0-e7e3c4865ce8 Note Title
aba21e55-22c6-4c50-8bf6-bf3b337468e2 Another…
I would expect that !! in zsh should expand to the last command executed. The same as !-1. But in my zsh, it always expands to the last but one.
Example
~$ echo 1
~$ echo 2
~$ !!
The last !! simply expands to echo 1.
Is there any option that…
I am trying to set up a new work environment, using zsh and an old set of dotfiles. I have this error with git information and I do not know how to solve it. Here is the error from iTerm2 as soon as I cd into my dotfiles repo:
~ ✔ cd…
Let's say I want to write a custom shell completion function that fires only on git checkout . I can write a custom hook for git completion like this:
complete -f -F _custom_completion_function git # bash
compctl -f -K…
according to the doc, !! should expand to the last command when hit after it. However, this is not the case for my setup (I used default oh-my-zsh). Here is an example:
$ echo 1
1
$ echo 2
2
$ !!
$ echo 1
Moreover, !# does not expand to…
I have a python program that utilizes action='append' of python. For example, I can use the command like this
mod_db -i $HOME -i $PWD -i /usr/local foo bar
How can I use _arguments or anything else to implement the Zsh completion?
I have a custom ZSH tab-completion function for one of my tools. It works well, however sometimes it takes a long time for the tool to answer; is there a way to display some sort of indication that something is happening while the tool is running…
While I'm familiar with a few of the options Zsh provides for autocompletions (i.e. the standard Tab menu-complete and the Ctrl+i completion option), but I've been spoiled with the type of search/completion you can get out of PhpStorm.
For example,…
Basically, I want to make it so that if I run a command, say
cd ~/Library/Application Support/
it will replace that path with "~/Library/Application Support/"
Is this at all possible? I would also like it to apply to paths in my .zshrc.
Thanks
I'm trying to write a custom auto-complete script for zsh (or bash) for a command that has options starting with a slash.
For instance: MyCommand /foo=bar.txt /yolo=test /final=4
I've been trying to use the zsh helper _arguments but it did not…
I have my .zshrc set up like:
CASE_SENSITIVE="true"
HYPHEN_INSENSITIVE="true"
COMPLETION_WAITING_DOTS="true"
In a directory, I have two files: C.c and C_1.c. If I do
ls C
I get
ls C.c
If I do a again, it completes as
ls C.c…
I needed to get the fingerprint of a ssh key using:
$ ssh-keygen -lf ~/.ssh/id_rsa_user.pub
after typing:ssh-keygen -lf ~/.ss TAB It was not giving any options.
I had to do:
$ compdef _files ssh-keygen
After that I was available to autocomplete…