I recently switched from bash to zsh. How can I achieve the following tab completion behavior:
Enter the first letters, then press TAB. Complete the entry until the first ambiguous letter and immediately show the options / alternatives.
Currently,…
I have a function like this:
p() { cd ~/Clients/$1/Projects/$2; }
Then I can type:
p "Client here" "Project here"
and it takes me to:
~/Clients/Client here/Projects/Project here
Nothing special going on here. But how do I implement autocomplete…
I installed git via Homebrew. I get command line completions via the script installed in
/usr/local/etc/bash_completion.d/
However I want my custom git-* scripts to be completed too.
How would I tack this on to existing git completions?
I installed kubectl and tried enable shell autocompletion for zsh.
When I'm using kubectl autocompletion works fine. Howewer when I'm trying use autocompletion with alias k then shell return me
k g...(eval):1: command not found: __start_kubectl …
I have an little shell script (named "run") which redirects all output of a program to /dev/null:
#!/bin/bash
$@ &> /dev/null &
disown +
How can I say zsh that the whole autocompletion shall work for this?
I mean
$ run git com
autocomplete…
I cant seem to get Docker autocompletion working using Oh My Zsh on macOS
I have the following in my .zshrc file
plugins=(docker git brew osx)
The git, brew and osx autocompletion is working, if I type docker and tab I get a list of files not…
I used zsh and when I run Ctrl-R to search history command, I can only get the command executed in this session, but can't search all the history commands.
I know there is a .bash_history file in bash to store all the history commands and we can do…
I installed ohmyz.sh , on my mac book , i want to install kubectl autocompletion plugin for zsh , but not aware of the steps to install , can any one help on this please ?
I'm writing a zsh completion script for the swift tools (compiler and package manager). This command can be used with or without specifying a subcommand. For example
# calls to the compiler
# usage: swift [options]
1> swift…
I want to know which function zsh is using for tab completion of a command.
For many commands (make, ls, cd …) I can apparently guess _, but I might actually have overriden this setting with compdef _mycd cd.
The reasons why I want to…
How can I setup completion for a function, based on existing completion definitions and default arguments.
A simplified example (which could be rewritten as an alias):
gpl() {
git pull origin $@
}
This should have the same completion as after…
Whenever I run bower install or any bower command, it ends up running as bundle install or something else from bundler. I'm running a zsh shell with oh-my-zsh. It works as expected in a bash shell.
Example output:
% bower install
bundle install…
I encounter a problem with Zsh autocompletion for some specific git commands (the ones involving a remote and a branch), but only when using aliases.
Here is an example with push:
$ git push origin master # tab completion works
$ git…
I'm writing some zsh completions and am stuck on how to have multiple groups of completions.
I added the group name with the -J parameter docs.
compadd -J group1 "$@" completion1 completion2
compadd -J group2 "$@" completion3 completion4
Then I…