Skip to content

Commit e6da07f

Browse files
authored
Add git reset completion (#1027)
Added a git completion for git reset.
1 parent eaf7ecf commit e6da07f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

custom-completions/git/git-completions.nu

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,22 @@ export extern "git checkout" [
190190
-l # create reflog for new branch
191191
]
192192

193+
export extern "git reset" [
194+
...targets: string@"nu-complete git checkout" # name of commit, branch, or files to reset to
195+
--hard # reset HEAD, index and working tree
196+
--keep # reset HEAD but keep local changes
197+
--merge # reset HEAD, index and working tree
198+
--mixed # reset HEAD and index
199+
--patch(-p) # select hunks interactively
200+
--quiet(-q) # be quiet, only report errors
201+
--soft # reset only HEAD
202+
--pathspec-from-file: string # read pathspec from file
203+
--pathspec-file-nul # with --pathspec-from-file, pathspec elements are separated with NUL character
204+
--no-refresh # skip refreshing the index after reset
205+
--recurse-submodules: string # control recursive updating of submodules
206+
--no-recurse-submodules # don't recurse into submodules
207+
]
208+
193209
# Download objects and refs from another repository
194210
export extern "git fetch" [
195211
repository?: string@"nu-complete git remotes" # name of the branch to fetch

0 commit comments

Comments
 (0)