From 342d0644acd170793724b91ef47fd711007f4332 Mon Sep 17 00:00:00 2001 From: George Christou Date: Thu, 19 Apr 2018 14:00:35 +0100 Subject: [PATCH] completions: [git] Don't try to complete files when not in a repo --- share/completions/git.fish | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/completions/git.fish b/share/completions/git.fish index 7319f59a2..424de7129 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -71,6 +71,8 @@ function __fish_git_files # Save the repo root to remove it from the path later. set -l root (command git rev-parse --show-toplevel 2>/dev/null) + # Do not continue if not inside a Git repository + or return # Cache the translated descriptions so we don't have to get it # once per file.