Questions tagged [zsh-completion]

Questions about command completion in the zsh Unix shell.

Questions about command completion in the Unix shell.

Resources

243 questions
0
votes
0 answers

Is there a way to reproduce zsh tab completion with readline

As the post subject’s says, I want to know if there is a way with GNU readline library in C to reproduce the colored background like zsh does when pressing tab key. I want to add this feature for the shell, I am currently working on.
dieri
  • 23
  • 6
0
votes
1 answer

How to change the selected completion item color for `zsh zstyle list-colors` in .zshrc?

I'm looking to customize the selection color in zsh history and found one example. zstyle ':completion:*' list-colors 'ma=48;2;76;86;106' It works, and I can tinker with the numbers to make changes, but I can't find an explanation for ma=. What is…
GollyJer
  • 23,857
  • 16
  • 106
  • 174
0
votes
0 answers

Is there a ways for zsh completion to ignore multiple command prefixes?

I'm trying to add zsh completions for some aliases which are prefixed by a command and some args. More specifically, I have some commands which are aliased to an envchain ENV_NAME prefix. For example: alias brew='envchain homebrew-credentials brew'…
Calin Don
  • 865
  • 2
  • 11
  • 19
0
votes
3 answers

When I use a terminal or zsh I can't run commands, And this is what appears: /dev/fd/14:18: command not found: compdef

When I use a terminal or zsh I can't run commands, And this is what appears: # /dev/fd/14:18: command not found: compdef # Does anyone know how to reset the terminal to normal mode? I tried to solve it and the only thing that got my terminal…
0
votes
0 answers

What does ''r:|[._-]=* r:|=*' accomplish in ZSH Completion matching?

Does r:|[._-]=* r:|=* accomplish anything in ZSH Completion matching? Aren't we already matching forward on the right hand side? I've tried a few examples with it on and off and it seems like it accomplishes nothing Completion already completes…
Terrryyy1
  • 31
  • 4
0
votes
0 answers

zsh autocomplete suggestion

I have a docs command in my project and a docs folder in my root directory "scripts": { "docs": "pnpm -C docs dev" }, When I type pnpm docs Press Enter and zsh will complete pnpm docs/ Trying to turn off the zsh-autosuggestions plugin won't…
oops
  • 1
0
votes
1 answer

zsh autocompletion only if there is unique match

I recently switched from bash to zsh and I am trying to figure out how to change the double tab autocomplete behavior. I'd like it to autocomplete only if there is a unique match.
Christina A
  • 390
  • 1
  • 10
0
votes
0 answers

Display alias command in ZSH completion

Having lot of aliases might be confusing, such as when they are brought by zsh git plugin for instance. I wonder if it's possible to display the definition next to the alias for each one. I'm surprised I'm not able to find, so maybe I've used wrong…
user3042096
  • 119
  • 5
0
votes
0 answers

How to change font color after accepting zsh-autosuggestions' recommendation

I used to use fish, which has this realy useful and good autosuggestion. Recently I tried to start using zsh and install the zsh-autosuggestions plugin.\ But I noticed that if I accept the recommendation of the plugin, the font color won't…
0
votes
0 answers

zsh completion to use word at cursor to run command

I have been trying to grok how to write zsh completions, but he gap between understanding Create Basic ZSH-Command with Auto-Completion (super simple example and easy to understand) and zsh completions howto got to me and I couldn't figure this out.…
Robert Mark Bram
  • 8,104
  • 8
  • 52
  • 73
0
votes
0 answers

how to add your own zsh simple filetype completion?

I am guessing that I should not edit the .zcompdump file, because it may be overridden. Is this correct? but what is the recommended mechanism to extend it? let's say I simply want my latex command, called mylatex, which should only be run on…
ivo Welch
  • 2,427
  • 2
  • 23
  • 31
0
votes
0 answers

In zsh, is the tag "dynamic-dirs" special?

I’m wanting to do basically what this function does. It comes from the zsh manual page and other zsh documentation. I’m trying to “vaguely understand” without diving into the fine details what this function is doing and how it works. In this case,…
pedz
  • 2,271
  • 1
  • 17
  • 20
0
votes
0 answers

Oh My Zsh - remove extra space inserted when typing asterisk

Here is the scenario. Let's say I am in a directory ("Downloads") Now I type rm -rf and press the tab key for the list of files to show up. So I get: I press tab again (three times) and select file1 Notice that the cursor is just after last…
vicky
  • 93
  • 1
  • 6
0
votes
1 answer

zsh issue : have the most recents files or directories near to the prompt and suggested most recent files or directories

On MacOS Big Sur 11.3, here is my .zshrc. I would like to get the newest files or directories near to the prompt (sorted from the most recent up to the oldest ones). For the moment, I make test with the following command alias of ls : The issue is…
user1773603
0
votes
1 answer

How do I remap the `tab` key in zsh-autosuggestion to replace the →

In zsh-autosuggestions the TAB key accepts the suggestion but then also tries providing more suggestions, which is a difference in behaviour from fish-shell. In fish if you Tab it completes the word and doesn't offer anything else until you start…
Rhahkeem
  • 15
  • 5