Skip to main content

All Questions

Tagged with
1 vote
2 answers
379 views

git autocompletions in Fish: how can I disable them or speed them up?

I'm running Fish shell (3.6.0) on Ubuntu. Let's say that I'm trying to run git add foo/bar.txt . I type: git add foo and then I press tab . Now the shell freezes up for a few seconds. Even pressing ...
Flimm's user avatar
  • 4,238
0 votes
1 answer
77 views

Complete a positional argument only once

I'm trying to write a completion for a command (call it gs) that takes an SSH hostname as its first argument, and an arbitrary string as the second argument. I've stolen this from the default SSH ...
Arno's user avatar
  • 103
1 vote
1 answer
160 views

Fish completion that depends on other flags

I have a command, that can connect to remote machines and so the completion should be based on which machine the user provided. That means that if the user pass -D DEVICE_ID I want the completion to ...
yotamN's user avatar
  • 111
3 votes
1 answer
277 views

Fish Completions - How to prevent file completions?

I am trying to write some completions for an in-house tool. We'll call it thetool. Lots of the commands to thetool do not take a 'file' as an argument. I thought that --no-files and/or --exclusive ...
Joel Dunham's user avatar
3 votes
1 answer
944 views

When pressing tab, how can I make fish complete to directory/ instead of directory/prefix?

I'm using fish shell. Let's say that I have a directory named books, containing files title-1, title-2 and title-3: $ tree books books/ ├── title-1 ├── title-2 └── title-3 0 directories, 3 files If ...
Flimm's user avatar
  • 4,238
2 votes
2 answers
197 views

Fish shell reports "math: Error: Missing operator" on tab completion

I noticed the error this morning, but I don't think I have changed anything last night, so I am very confused right now. Perhaps I updated some utilities on my system and it somehow broke the back ...
nalzok's user avatar
  • 401
2 votes
3 answers
1k views

Is there a way to validate a completion file?

I have tool that is able to create a completion file for bash, zsh and fish. I normally use zsh, but i cannot get this completion file to work on zsh. So as a test i installed fish and created the ...
Ton Machielsen's user avatar
0 votes
1 answer
138 views

Function tab-completion not matching that of wrapped command

I've got a function defined in my fish shell: function cl --wraps=cd cd $argv && ls -l --color=auto end According to man function, the --wraps option "causes the function to inherit ...
Daniel Walker's user avatar
1 vote
1 answer
243 views

fish - Maximum recursion depth reached with tab-complete

With my fish shell, I have defined the alias alias black='command black -l 110' When I type black in my shell and start to tab-complete, I get the error complete: maximum recursion depth reached ...
Daniel Walker's user avatar
1 vote
1 answer
212 views

Fish completion script

I'm working on a completion script for a command, and I'm stuck. The docs and various websites I find don't fit what I need. The main command is pacstall and it has the flags: -I -S -R -C -U -V -L -Up ...
Plasma's user avatar
  • 121
2 votes
1 answer
643 views

Fish shell, disable pager navigation through Tab / Shift Tab

Fish is a great shell (the best?) but its completion interface has a particular quirk that I personally don't like and would like to disable. It's expressed by this sentence in the tutorial: Hit ...
Tobia's user avatar
  • 679
2 votes
0 answers
120 views

Printing autocomplete info on current option in fish shell

When writing a command with a - option and pressing tab, a list of possible completions with short explanations of what the options do is displayed. Is there a way to make this list also contain the ...
gris_martin's user avatar
5 votes
1 answer
586 views

Shell that tab-completes prefix?

I would like tab completion to behave differently when the cursor is at the beginning of a word than when the cursor is at the end of a word. I've only ever seen shells that tab-complete the suffix, ...
Nathaniel M. Beaver's user avatar
3 votes
1 answer
617 views

Show completions under the prompt in Fish

Is there a way I can get the ultra compact auto-complete function from Zsh in Fish, so If I press Tab it won't write me all the possibilities permanently into my terminal but underneath the prompt?
user2927980's user avatar
51 votes
3 answers
60k views

How to make zsh completion show the first guess on the same line (like fish's)?

In Fish when you start typing, autocompletion automatically shows the first autocompleted guess on the line itself. In zsh you have to hit tab, and it shows the autocompletion below. Is there anyway ...
korylprince's user avatar
  • 1,841