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
1 answer

VSCode terminal send same sequence like in iterm

I am using VSCode integrated terminal together with zsh and zsh-autosuggestions. Everything is working as expected except for autosuggest-execute command. I am looking for a way to send '^[auto' sequence to VSCode terminal, none of my attempts…
MartinT
  • 590
  • 5
  • 21
0
votes
1 answer

zsh autocompletion for a specific program

I have a program, let's call it myprog which takes a few options (-o, --option...) with or without argument. Is there a way to configure zsh so when I use the key it lists the options ? It is the case when I type for example ls -. Here is…
Thomas
  • 263
  • 3
  • 14
0
votes
0 answers

zsh completion : option zstyle ':completion:*' menu yes=long select to show the menu but bad foreground/background colors displayed for suggestions

I have the following option for completion in my ~/.zshrc : # ZSH completion autoload -Uz compinit compinit # Colorize completions using default `ls` colors. zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Zsh reverse…
user1773603
0
votes
1 answer

kubectl exec with parameter -ti completion failed

Zsh completion works fine for kubectl exec, but failed for kubectl exec -ti. I already did this echo "[[ $commands[kubectl] ]] && source <(kubectl completion zsh)" >> ~/.zshrc # add autocomplete permanently to your zsh shell from official document…
Peter
  • 357
  • 3
  • 10
0
votes
1 answer

How should a function passed to _arguments for zsh shell completion look like?

In my completion function, I'd like to add an option which possible arguments depend on which files are on the system. I have no troubles getting that list of possible arguments, but I have no idea what I should do with it. This guide talks about…
ismxy
  • 21
  • 3
0
votes
1 answer

Changing a default Zsh completion function

I noticed that tab completion for the source command in Zsh tries to complete a LOT of files. Maybe everything in $PATH? I tried using a blank .zshrc file to make sure it wasn't anything in there. ubuntu% source d zsh: do you wish to see all 109…
Andrew Lamarra
  • 507
  • 2
  • 10
0
votes
1 answer

How to setup completion of environment variable names in zsh?

In bash when I try to use autocompletion in double-quoted strings it works: E.g. echo "My home directory is $HO" # expands to echo "My home directory is $HOME" But when I try the same thing in zsh it just does nothing. At the same time it works…
Dmitry Barskov
  • 1,200
  • 8
  • 14
0
votes
1 answer

How do I make a zsh function autocomplet from the middle of a word?

I use zsh and wrote a function to replace cd function. With some help I got it to work like I want it to (mostly). This is a followup to one of my other question. The function almost works like I want it to, but I still have some problems with…
0
votes
1 answer

How do I make a zsh function autocomplete as a file?

I use zsh and wrote a function to replace cd function. With some help I got it to work like I want it to (mostly). This is a followup to one of my other question. The function almost works like I want it to, but I still have some problems with…
0
votes
1 answer

Adding an autocompletion script to ZSH seems not to be working

I have a Git repository, omni. omni is checked out at ~/omni. There is a completion script at ~/omni/completions/_omni. I set fpath=( ~/omni/completions $fpath ), via ~/.zprofile so the completion script should get picked up but is not. This is…
Zach Riggle
  • 2,975
  • 19
  • 26
0
votes
1 answer

How can I debug ZSH completion for git on macos

I switched to zsh when I upgraded to Catalina and have been generally very happy, especially with how many completions just work without any work on my part. But sometime in the last week or so, completions stopped working. It had been working…
Marvin
  • 2,537
  • 24
  • 35
0
votes
0 answers

after reset-prompt,the command line jump to next line automatically

①I have tried to use an dynamic clock with time refresh settings in ~/.zshrc TMOUT=1 TRAPALRM () { zle reset-prompt } ②my full modified theme file is bullet-train.zsh-theme my whole ~/.zshrc file is.zshrc My problem is: when my terminal enter…
user13268019
0
votes
1 answer

How to setup a keybinding in ZSH to resolve and edit the last command registered in the history?

Given: I've just run the script $ my-script.sh which lives in ~/bin and is a symlink to the real file $ ls -l ~/bin [...] /Users/myself/bin/my-script.sh -> /Users/myself/.config/scripts/real-name.sh Then: I'd like to edit the file pointed at by…
acorello
  • 4,473
  • 4
  • 31
  • 46
0
votes
0 answers

Zsh: complete the files in current directory no matter what command is

For example, when I just want to make cfiles without makefile: $ make a a1.c a2.c a3.c ... or run the script like: $ ./a a1 a2 a3 ... but seems that zsh would detect the command then completes nothing when I hit tab. It works fine…
Baix
  • 1
  • 1
0
votes
2 answers

Zsh completion for global aliases

Is there a way to get tab completion for global aliases in zsh? Defined as: % alias -g zshplugins=~/.zshplugins % nvim zshpl[tab] would not tab complete. I use global aliases mainly to not have to enter the path to a file nor restrict myself to a…
simohamed
  • 61
  • 1
  • 4