1

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 backspace does nothing.

How can I fix this? Can I disable filename autocompletion for Git? This slowness only seems to happen when I'm trying to specify a file for a git command.

2 Answers 2

1

You can disable the special autocompletion logic that Fish uses for git, falling back to default autocompletion behaviour. To do that, create an empty file like this:

echo -n > ~/.config/fish/completions/git.fish

Now if you press tab after git add foo/ , it will suggest all the files in that directory. It doesn't distinguish between clean files and files that have uncommitted changes.

I don't know how to fix the issues of the slowness without disabling the specific git functionality.

0

This exact behavior could be explained if there are a great many untracked files, e.g. a node_modules folder that is not git ignored. Try the git add tab completion in a clean working directory and see if the slowness persists.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .