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

ZSH file completions from 2 path

I have 2 folders that contains folders /me/foo/: a/ b/ c/ /me/bar/: c/ d/ e/ I want to create completion function for command baz so that $ baz [tab] gives completion arguments as follow a b c d e notice the duplicate c written only…
ahmy
  • 4,095
  • 4
  • 27
  • 36
0
votes
0 answers

ZSH Symfony Console Auto Completion

I'm trying to create a ZSH auto completion script for Symfony's Console, I almost finished it but I block in the last part. I need to create an array thanks to a function returns, but I don't know how to process. Here's the code I…
Cronos87
  • 1,816
  • 3
  • 12
  • 14
0
votes
1 answer

Completing options of the form --

I'm trying to write a completion method for fsharpi (F# interactive), which has options like the following: --use: Use the given file on startup as initial input --debug:{full|pdbonly} Specify debugging type: full, pdbonly.…
Ludvig
  • 3
  • 3
0
votes
1 answer

zsh completion - List files of certain mime type

I'm writing an auto-completion script for an image viewer application. Is there a way to specify to list only files in the directory that are of a certain mime? I.e., all types of mime image. What I am doing now: _arguments -C \ ... # Handle…
stereolink
  • 33
  • 1
  • 2
0
votes
0 answers

Zsh CASE_SENSITIVE does nothing

I installed my Mac with a case sensitive filesystem. Everything is fine, other than Zsh not being as fluent as it used to be. I've confirmed the Oh-My-Zsh variable CASE_SENSITIVE is commented out in .zshrc but it's still failing to find folders of…
Qix - MONICA WAS MISTREATED
  • 14,451
  • 16
  • 82
  • 145
0
votes
1 answer

Zsh Slow in Dir of Git Repo

I am using zsh shell and it has become very slow running any commands such as 'ls' 'cd' in directories that are Git Repo. In bash it works fine and fast. I also notice that the title of shell displays 'git' with spinning wheel on side. it appears…
latvian
  • 3,161
  • 9
  • 33
  • 62
0
votes
1 answer

Tab-triggered snippets in shell

Is there a way to use tab key in bash or zsh to trigger a snippet, like e.g. Sublime Text does it? For example, if I have configured that x should be expanded to ~/projects/one/two/x/, so: $ cd x[TAB] would turn into $ cd ~/projects/one/two/x/
Frantic
  • 1,179
  • 11
  • 25
0
votes
1 answer

Weird function declaration (or is it?) in zsh

I tried to find certain files by filename creation in zsh (although I read the manpage multiple times I did not really now what I was doing), but I think something went terribly wrong: After I typed echo 10-02-2015.*(), I was prompted to type…
Lukas Juhrich
  • 395
  • 1
  • 4
  • 13
0
votes
1 answer

Supress correction by argument in zsh

Suppose I have the file tree -A_dir/ - a_test_file1 Doing mv a_test_file1 a_test_file2 results in an annoying correction query. The second argument of mv should never be corrected, as it may or may not point to an existing node on the filesystem.…
PythonNut
  • 6,182
  • 1
  • 25
  • 41
0
votes
1 answer

is `cap` a reserved word? - zsh completion?

I'm trying to create a Capistrano mutilstage completion for ZSH: $ cap | production staging $ cap production | deploy -- Deploy a new release deploy:bundle -- Bundle ... Completion code: #compdef…
Pablo Cantero
  • 6,239
  • 4
  • 33
  • 44
0
votes
1 answer

How can I use ! expansion in a ZSH script?

I'd like to write a function that makes it easier to use parameters of the previous command more easily, such as !:1. I've read that in bash this can be accomplished with: set -o history set -o histexpand So how could I write a zsh function that…
ian
  • 234
  • 2
  • 9
0
votes
1 answer

Completion: Multiple similar options

I want to write completions for a program that takes --with-PROG= and --PROG-options as optional arguments. PROG may be one of different programs. There are many different programs, so I'd like to avoid manually writting out an options for each…
bennofs
  • 11,873
  • 1
  • 38
  • 62
0
votes
1 answer

How to substitute only the highest number in zsh?

I have a folder with materials for university study, sorted by semesters: $ ls University semester1 semester2 semester3 semester4 I'm trying to make one of them the named directory, and I want zsh to allways pointed to directory ending with highest…
khardix
  • 1
  • 1
0
votes
1 answer

ZSH completion order

I have a ZSH completer that provides the expected completions, but provides them in lexicographical order, as opposed to the order in which they were added via compadd: _matcher_complete() { (git ls-files 2>/dev/null || find .) |…
Charles
  • 6,199
  • 6
  • 50
  • 66
-1
votes
1 answer

ZSH Completions based on a directory, works after only after 'exec zsh'

for example, when i start terminal and type brew install spot and press TAB - nothing, only dir like a Desktop/, but when i exec zsh everything magically starts working
finegorko
  • 57
  • 8
1 2 3
16
17