Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
23 views

Show completion menu instead of auto-selecting first match

Suppose there are executable commands named a, ab, ac, ad in my path. If I type a [tab] at the zsh prompt, zsh simply adds a space after the a. Well, that's not wrong, because a is an existing command....
java.is.for.desktop's user avatar
1 vote
1 answer
49 views

Mix _arguments and _values in zsh autocomplete script

I have a command with a very structured input like cmd --help cmd A -flagA1 X cmd A -flagA2 Y cmd B -flagB1 Z Where X,Y,Z are fixed values and depend on whether A or B is enabled. Ideally, I'm trying ...
Davidbrcz's user avatar
  • 2,449
0 votes
0 answers
14 views

Include redirects in $words for zsh completions or equivalent

How can I include redirects in $words for zsh completions or do something equivalent? If it cannot be done for $words, I know that I can use ${(z)BUFFER} to parse the full command line into an array. ...
XDR's user avatar
  • 4,510
1 vote
1 answer
76 views

zsh completion function (compdef) not completing _arguments

I am writing an autocomplete function for my personal cli. Here below is a reduced version of my compdef. As I type my-cli <TAB> I can see the subcmd autocompleting. As I type my-cli macos <...
64rl0's user avatar
  • 112
0 votes
0 answers
259 views

iTerm2 + Starship + zsh-autosuggestions

I'm on a mac. This erroneous behaviour only occurs in iTerm2. Not in the built in Terminal application. Not in Warp. If I activate the Starship prompt. Combined with if I activate the zsh-...
Manolo's user avatar
  • 1,686
1 vote
1 answer
294 views

AWS CLI command completions for zsh [closed]

I want to use the AWS CLI v2 with zsh command completion. There are instructions here, but they refer to a file aws_zsh_completer.sh which does not exist in the downloaded zip file, nor in /usr/local/...
lonix's user avatar
  • 21.5k
1 vote
1 answer
66 views

Creating a Custom Autocomplete Script in ZSH Around Project Root Path

I'm trying to create a script that will mimic cd where I provide a path, and the script cd's to that by appending it to an absolute existing path. The idea is that wherever I call it, it will always ...
Makan Azarshahy's user avatar
3 votes
0 answers
572 views

How to disable Tab triggering `ls` and list of suggestions in oh-my-zsh?

How can I disable the feature in oh-my-zsh where pressing tab triggers ls (list directory)? Similarly, when typing certain characters like c or g and then hitting tab, I'm also getting zsh: do you ...
Moritz W's user avatar
  • 570
0 votes
0 answers
135 views

Zsh-autocomplete config that recognizes ".."+TAB and searches previous directoy

I want the zsh-autocomplete magic to work when when I do cd ..TAB to automatically recognize it as ../ and run fzf. If I just write cd ../TAB it works normally but I know it is possible because it was ...
potatoOnABus's user avatar
1 vote
1 answer
258 views

unable to add color to zstyle completion

I am using eza instead of ls and have made changes in .zshrc alias ls="eza --icons=always" I want to add colors to my zstyle completion zstyle ':completion:*' list-colors "${(s.:.)...
Anshul Goyal's user avatar
1 vote
0 answers
101 views

How to remove trailing slash from ZSH’s _files results?

I’m trying to create an autocompletion rule for a function that take an existing directory which should be located in a specific directory as an argument. VENVS_PATH="${ZDOTDIR:-$HOME}/.pyvenv&...
Jonathan L.'s user avatar
1 vote
1 answer
689 views

Where is 'zsh' getting tab completion content from for 'ssh'?

I have some hosts defined in my ~/.ssh/config file (ari-1, ari-2, etc.), but when I type ssh ar<TAB> I get ssh ari.sweedler.com. Granted, that is a valid domain, but it doesn't show up anywhere ...
Ari Sweedler's user avatar
2 votes
0 answers
2k views

How to set up zsh autocompletion correctly?

I'm having some trouble setting up the zsh shell correctly. My .zshrc looks like this # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. if [[ -r "${XDG_CACHE_HOME:-$...
Sito's user avatar
  • 554
1 vote
0 answers
475 views

Getting error "_git:19: command not found: _default" when implementing git-completion scripts in zsh

I am trying to configure my zsh terminal to use git's tab completion script. Some of my trouble may be coming from a non-standard file structure: $ tree ~/Scripts /Users/luigi/Scripts ├── connect.sh ├─...
FinalFormLuigi's user avatar
-1 votes
1 answer
101 views

Custom environment variable name completion in zsh

I am trying to customize how zsh completes environment variable names for my custom command ee. Here is the problem: I've defined a custom completion function using compdef, and it works perfectly if ...
zeionara's user avatar

15 30 50 per page
1
2 3 4 5
17