I'm using this excellent script in my .zshrc file to accomplish zsh abbreviations:
http://zshwiki.org/home/examples/zleiab
The above works great.
Here's my question:
How can I modify these abbreviations or the script to have the cursor end up in…
I've seen things like this zsh.org thread and this Reddit thread that shows how to highlight the common prefix of the completions with a color. Unfortunately, this overrides the LS_COLORS that I've set. I derive a lot of information from my…
Is it possible to pass the contents of a file using cat to _values (zsh completion)?
If I uncomment the line _values cat .test_tasks~ and comment _values below, it doesn't work, I get: _values:compvalues:10: invalid value definition:…
if I type the following where record is a zsh function
record ls
how do I write a zsh completion for record such that if I write
record ls -
it will use zsh's completion for ls e.g.
-1 -- single column output
-A -- list…
I recently wrote a handy Zsh function that creates a new tmux session with no arguments. If an argument is provided and the session already exists, it's attached. Otherwise, a new session is created with the provided name.
# If the session is in the…
I love the tab completion feature in zsh. But when I use hadoop command, it seems do not work anymore. So is there any idea to auto-completion for hadoop command in zsh?
Many thanks.
Say I have a script foo which can be called as:
foo git clone http://example.com
or as:
foo print 12
etc.
How can I make a compdef that delegates to $argv[0] here to allow it to handle completion?
compdef cmd1=service can be used to define a completion alias, however, that works only when the arguments are going to be the same.
For example, consider a helper script which rewrites some arguments before executing another command:
| What is…
I've just got into zsh recently, mainly to use it for git on vscode only (cause it looked superr goood)
I've been using fish for a very long time, and even now I'm using it as my default shell
So I'm trying to configure zsh to behave more like fish…
For example, let's suppose I just copied something:
mv foo_file.txt ~/to/some/long/path/that/i/do/not/want/to/retype
and I'd like to use history substitution like so:
mv bar_file.txt !!:2
I'm surprised that zsh is not expanding the !!:2 for me…
I'd like to write a zsh-completion script, which completes with files in a directory different from the current working directory. (I can archieve this, see below.)
Additionally the user shall be able to use globbing on the completed command. How…
I'm using zsh, and the completions mostly just work. But when I use various commands where an arbitrary command follows a command with specialized zsh handling, file path completions don't work.
# completes to 'npm run build' for a package.json…
Currently I have this in my ~/.zshrc:
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
AFAIU 'm:{a-z}={A-Za-z}' means that I will get case-insensitive tab completion, e.g. foo will tab-complete to Foobar (if…
I have a tool that runs other tools, that I would like to enable completion from the commands it runs. For example:
mytool git grep --
Should autocomplete for git grep. This works fine with e.g. sudo:
sudo git grep --
Shows the…
Is there any way to enable arrow keys selection for the kill command in zsh?
E.g.
$ kill
gives me a list of all currently running processes, and I can then use arrow keys to select a specific one.
However, when I do:
$ kill foo
I get a…