I am having difficulty getting zsh to autocomplete the way that I would like it to. Ideally, I would like type some string (that could be a single character), and after hitting tab, get a list of every file and directory that has that string in it,…
I'm writing completion function for zsh. I took cargo completion function as a basis for mine. For the most part it works fine except for -h and --help options. Completion ouput for these functions is unaligned and repeated multiple times (presented…
Normally, when I use tab complete for a program that doesn't have completion defined, it will just default to completing on files. However, with the bat command I get something that looks like this:
1010 ⮚ bat (eval):1: command not found:…
When using bash, if I have an environment variable called SOMEPATH which contains a path (e.g. SOMEPATH=/usr/local/lib), then if I type
ls $SOMEPATH/
and hit tab then bash expands the environment variable so my command line now says
ls…
My keyboard layout is very similar to classic latin but with some extra characters like ç, ş, ö, ü, ğ, İ.
I wanted to bind these chars in zsh like “bindkey “^Ş” autosuggest-accept” how can I do that?
The answers given in Disable auto-completion of remote branches in Zsh? no longer work, as zsh has changed the way it does this in the last six years.
I've hacked up a version of the __git_refs function which does not list remotes, and stored the…
I have a shell function that lets me quickly cd to a project:
p() {
cd "$HOME/projects/$1"
}
However, it isn't very useful without autocomplete. I'm using oh-my-zsh, any idea how best to add oh-my-zsh's standard cd autocomplete to my function p?
I am using Zsh with iTerm2 and trying to follow these instructions to remove a commit that I accidentally pushed to a repo (don't worry, it doesn't have any followers other than me).
Running the command
git push -f origin HEAD^:develop
causes an…
I have a script that takes file like arguments (multi part arguments), I am fetching the possible values and putting them in an array called raw and then using
_multi_parts / "(${raw[@]})"
to autocomplete. The problem is that this is case…
I recently switched over to fish shell and want to know whether it can autocomplete file paths as in zsh without specifying it's parent directories. For a file in foo/bar/file.ext, in zsh, I can type open .///file and autocomplete to open…
My zsh has some completion features I don't understand and can't find where to change. I have two issues where I suspect they have a similar "fix" for my problem. I initialize the zsh completion system with
autoload -Uz compinit
compinit
to get…
I need to auto-complete two parameters of a function, where the second parameter depends on the first one.
An example: the first parameter of a function "foo" can have values of "a" or "b". The second parameter can have values "10" or "11" in case…
I'm really like AUTOCD option in zsh but widget names make it less comfortable in use. The problem is when I'm e.g. in my home directory, type "down" and press Tab I would expect completion for "Downloads" but on the first place in auto-completion…
How to give the highest priority to the folders group on tab complete? Right now, during the completion (no cd in front), almost everything is placed before folder names, so it's a bit of annoying to iterate through system commands, functions, etc.…