Skip to content

Commit 1f390f2

Browse files
committed
Merge branch 'dc/complete-restore'
The command line completion support (in contrib/) learns to give modified paths to the "git restore" command. * dc/complete-restore: completion: tab completion of filenames for 'git restore'
2 parents 889860e + 841fd28 commit 1f390f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/completion/git-completion.bash

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2890,6 +2890,10 @@ _git_restore ()
28902890
--*)
28912891
__gitcomp_builtin restore
28922892
;;
2893+
*)
2894+
if __git rev-parse --verify --quiet HEAD >/dev/null; then
2895+
__git_complete_index_file "--modified"
2896+
fi
28932897
esac
28942898
}
28952899

0 commit comments

Comments
 (0)