mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-12 13:08:49 +00:00
completions: [git] Don't try to complete files when not in a repo
This commit is contained in:
parent
c31861fdd1
commit
342d0644ac
1 changed files with 2 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue