-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompletions.nu
2134 lines (2059 loc) · 107 KB
/
completions.nu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
def "nu-complete git branches" [] {
^git branch | lines | each { |line| $line | str replace '* ' "" | str trim }
}
def "nu-complete git switchable branches" [] {
let remotes_regex = (["(", ((nu-complete git remotes | each {|r| ['remotes/', $r, '/'] | str join}) | str join "|"), ")"] | str join)
^git branch -a
| lines
| parse -r (['^[\* ]+', $remotes_regex, '?(?P<branch>\S+)'] | flatten | str join)
| get branch
| uniq
| where {|branch| $branch != "HEAD"}
}
def "nu-complete git switchable branches with head" [] {
["HEAD"] ++ (nu-complete git switchable branches)
}
def "nu-complete git remotes" [] {
^git remote | lines | each { |line| $line | str trim }
}
def "nu-complete git remote or branch" [] {
(nu-complete git remotes) ++ (nu-complete git branches)
}
def "nu-complete git log" [] {
^git log --pretty=%h | lines | each { |line| $line | str trim }
}
def "nu-complete git commits" [] {
^git rev-list --all --remotes --pretty=oneline | lines | parse "{value} {description}"
}
# Check out git branches and files
export extern "git checkout" [
...targets: string@"nu-complete git switchable branches" # name of the branch or files to checkout
--conflict: string # conflict style (merge or diff3)
--detach(-d) # detach HEAD at named commit
--force(-f) # force checkout (throw away local modifications)
--guess # second guess 'git checkout <no-such-branch>' (default)
--ignore-other-worktrees # do not check if another worktree is holding the given ref
--ignore-skip-worktree-bits # do not limit pathspecs to sparse entries only
--merge(-m) # perform a 3-way merge with the new branch
--orphan: string # new unparented branch
--ours(-2) # checkout our version for unmerged files
--overlay # use overlay mode (default)
--overwrite-ignore # update ignored files (default)
--patch(-p) # select hunks interactively
--pathspec-from-file: string # read pathspec from file
--progress # force progress reporting
--quiet(-q) # suppress progress reporting
--recurse-submodules: string # control recursive updating of submodules
--theirs(-3) # checkout their version for unmerged files
--track(-t) # set upstream info for new branch
-b: string # create and checkout a new branch
-B: string # create/reset and checkout a branch
-l # create reflog for new branch
]
# Download objects and refs from another repository
export extern "git fetch" [
repository?: string@"nu-complete git remotes" # the name of the remote
...refspec: string@"nu-complete git switchable branches" # the branch / refspec
--all # Fetch all remotes
--append(-a) # Append ref names and object names to .git/FETCH_HEAD
--atomic # Use an atomic transaction to update local refs.
--depth: int # Limit fetching to n commits from the tip
--deepen: int # Limit fetching to n commits from the current shallow boundary
--shallow-since: string # Deepen or shorten the history by date
--shallow-exclude: string # Deepen or shorten the history by branch/tag
--unshallow # Fetch all available history
--update-shallow # Update .git/shallow to accept new refs
--negotiation-tip: string # Specify which commit/glob to report while fetching
--negotiate-only # Do not fetch, only print common ancestors
--dry-run # Show what would be done
--write-fetch-head # Write fetched refs in FETCH_HEAD (default)
--no-write-fetch-head # Do not write FETCH_HEAD
--force(-f) # Always update the local branch
--keep(-k) # Keep dowloaded pack
--multiple # Allow several arguments to be specified
--auto-maintenance # Run 'git maintenance run --auto' at the end (default)
--no-auto-maintenance # Don't run 'git maintenance' at the end
--auto-gc # Run 'git maintenance run --auto' at the end (default)
--no-auto-gc # Don't run 'git maintenance' at the end
--write-commit-graph # Write a commit-graph after fetching
--no-write-commit-graph # Don't write a commit-graph after fetching
--prefetch # Place all refs into the refs/prefetch/ namespace
--prune(-p) # Remove obsolete remote-tracking references
--prune-tags(-P) # Remove any local tags that do not exist on the remote
--no-tags(-n) # Disable automatic tag following
--refmap: string # Use this refspec to map the refs to remote-tracking branches
--tags(-t) # Fetch all tags
--recurse-submodules: string # Fetch new commits of populated submodules (yes/on-demand/no)
--jobs(-j): int # Number of parallel children
--no-recurse-submodules # Disable recursive fetching of submodules
--set-upstream # Add upstream (tracking) reference
--submodule-prefix: string # Prepend to paths printed in informative messages
--upload-pack: string # Non-default path for remote command
--quiet(-q) # Silence internally used git commands
--verbose(-v) # Be verbose
--progress # Report progress on stderr
--server-option(-o): string # Pass options for the server to handle
--show-forced-updates # Check if a branch is force-updated
--no-show-forced-updates # Don't check if a branch is force-updated
-4 # Use IPv4 addresses, ignore IPv6 addresses
-6 # Use IPv6 addresses, ignore IPv4 addresses
]
# Push changes
export extern "git push" [
remote?: string@"nu-complete git remotes", # the name of the remote
...refs: string@"nu-complete git branches" # the branch / refspec
--all # push all refs
--atomic # request atomic transaction on remote side
--delete(-d) # delete refs
--dry-run(-n) # dry run
--exec: string # receive pack program
--follow-tags # push missing but relevant tags
--force-with-lease # require old value of ref to be at this value
--force(-f) # force updates
--ipv4(-4) # use IPv4 addresses only
--ipv6(-6) # use IPv6 addresses only
--mirror # mirror all refs
--no-verify # bypass pre-push hook
--porcelain # machine-readable output
--progress # force progress reporting
--prune # prune locally removed refs
--push-option(-o): string # option to transmit
--quiet(-q) # be more quiet
--receive-pack: string # receive pack program
--recurse-submodules: string # control recursive pushing of submodules
--repo: string # repository
--set-upstream(-u) # set upstream for git pull/status
--signed: string # GPG sign the push
--tags # push tags (can't be used with --all or --mirror)
--thin # use thin pack
--verbose(-v) # be more verbose
]
# Switch between branches and commits
export extern "git switch" [
switch?: string@"nu-complete git switchable branches" # name of branch to switch to
--create(-c): string # create a new branch
--detach(-d): string@"nu-complete git log" # switch to a commit in a detatched state
--force-create(-C): string # forces creation of new branch, if it exists then the existing branch will be reset to starting point
--force(-f) # alias for --discard-changes
--guess # if there is no local branch which matches then name but there is a remote one then this is checked out
--ignore-other-worktrees # switch even if the ref is held by another worktree
--merge(-m) # attempts to merge changes when switching branches if there are local changes
--no-guess # do not attempt to match remote branch names
--no-progress # do not report progress
--no-recurse-submodules # do not update the contents of sub-modules
--no-track # do not set "upstream" configuration
--orphan: string # create a new orphaned branch
--progress # report progress status
--quiet(-q) # suppress feedback messages
--recurse-submodules # update the contents of sub-modules
--track(-t) # set "upstream" configuration
]
# Apply the change introduced by an existing commit
export extern "git cherry-pick" [
commit?: string@"nu-complete git commits" # The commit ID to be cherry-picked
--edit(-e) # Edit the commit message prior to committing
--no-commit(-n) # Apply changes without making any commit
--signoff(-s) # Add Signed-off-by line to the commit message
--ff # Fast-forward if possible
--continue # Continue the operation in progress
--abort # Cancel the operation
--skip # Skip the current commit and continue with the rest of the sequence
]
# List, create, or delete branches
extern "git branch" [
target: string@"nu-complete git branches"
--env-filter # This filter may be used if you only need to modify the environment
--tree-filter # This is the filter for rewriting the tree and its contents
--index-filter # This is the filter for rewriting the index
--parent-filter # This is the filter for rewriting the commit
--msg-filter # This is the filter for rewriting the commit messages
--commit-filter # This is the filter for performing the commit
--tag-name-filter # This is the filter for rewriting tag names
--subdirectory-filter # Only look at the history which touches the given subdirectory
--prune-empty # Ignore empty commits generated by filters
--original # Use this option to set the namespace where the original commits will be stored
--force(-f) # Filter even with refs in refs/original or existing temp directory
--add # Add to the list of currently tracked branches instead of replacing it
--remotes(-r) # Shows the remote tracking branches
--all(-a) # Show both remote-tracking branches and local branches
--current # Includes the current branch to the list of revs to be shown
--topo-order # Makes commits appear in topological order
--date-order # Makes commits appear in date order
--sparse # Shows merges only reachable from one tip
--no-name # Do not show naming strings for each commit
--sha1-name # Name commits with unique prefix
--no-color # Turn off colored output
--delete(-d) # Delete branch
--force(-f) # Reset branch even if it already exists
--move(-m) # Rename branch
--copy(-c) # Copy branch
--all(-a) # Lists both local and remote branches
--track(-t) # Track remote branch
--no-track # Do not track remote branch
--set-upstream-to # Set remote branch to track
--merged # List branches that have been merged
--no-merged # List branches that have not been merged
--unset-upstream # Remove branch upstream information
--branch(-b) # Specify the branch to use
--default(-d) # Use default branch of the submodule
]
# Join two or more development histories together
extern "git merge" [
...refs: string@"nu-complete git switchable branches" # branch to merge with
--commit # Autocommit the merge
--no-commit # Don't autocommit the merge
--edit(-e) # Edit auto-generated merge message
--no-edit # Don't edit auto-generated merge message
--ff # Don't generate a merge commit if merge is fast-forward
--no-ff # Generate a merge commit even if merge is fast-forward
--ff-only # Refuse to merge unless fast-forward possible
--gpg-sign(-S) # GPG-sign the merge commit
--log # Populate the log message with one-line descriptions
--no-log # Don't populate the log message with one-line descriptions
--signoff # Add Signed-off-by line at the end of the merge commit message
--no-signoff # Do not add a Signed-off-by line at the end of the merge commit message
--stat # Show diffstat of the merge
--no-stat(-n) # Don't show diffstat of the merge
--squash # Squash changes from other branch as a single commit
--no-squash # Don't squash changes
--verify-signatures # Abort merge if other branch tip commit is not signed with a valid key
--no-verify-signatures # Do not abort merge if other branch tip commit is not signed with a valid key
--quiet(-q) # Be quiet
--verbose(-v) # Be verbose
--progress # Force progress status
--no-progress # Force no progress status
--allow-unrelated-histories # Allow merging even when branches do not share a common history
--rerere-autoupdate # If possible, use previous conflict resolutions
--no-rerere-autoupdate # Do not use previous conflict resolutions
--abort # Abort the current conflict resolution process
--continue # Conclude current conflict resolution process
--all(-a) # Output all merge bases for the commits, instead of just one
--octopus # Compute the best common ancestors of all supplied commits
--independent # Print a minimal subset of the supplied commits with the same ancestors
--is-ancestor # Check if the first commit is an ancestor of the second commit
--fork-point # Find the point at which a branch forked from another branch ref
--tool-help # Print a list of merge tools that may be used with `--tool`
--no-prompt(-y) # Do not prompt before launching a diff tool
--prompt # Prompt before each invocation of the merge resolution program
--verbose(-v) # Be more verbose
--quiet(-q) # Operate quietly
--commit # Finalize git notes merge
--abort # Abort git notes merge
]
# Forward-port local commits to the updated upstream head
extern "git rebase" [
remoteOrBranch?: string@"nu-complete git remote or branch", # the name of the remote / branch
...refs: string@"nu-complete git branches" # the branch / refspec
--continue # Restart the rebasing process
--abort # Abort the rebase operation
--edit-todo # Edit the todo list
--keep-empty # Keep the commits that don't change anything
--skip # Restart the rebasing process by skipping the current patch
--merge(-m) # Use merging strategies to rebase
--quiet(-q) # Be quiet
--verbose(-v) # Be verbose
--stat # Show diffstat of the rebase
--no-stat(-n) # Don't show diffstat of the rebase
--verify # Allow the pre-rebase hook to run
--no-verify # Don't allow the pre-rebase hook to run
--force-rebase(-f) # Force the rebase
--committer-date-is-author-date # Use the author date as the committer date
--ignore-date # Use the committer date as the author date
--interactive(-i) # Interactive mode
--preserve-merges(-p) # Try to recreate merges
--rebase-merges(-r) # Preserve branch structure
--root # Rebase all reachable commits
--autosquash # Automatic squashing
--no-autosquash # No automatic squashing
--autostash # Before starting rebase, stash local changes, and apply stash when done
--no-autostash # Do not stash local changes before starting rebase
--no-ff # No fast-forward
]
# Show changes between commits, commit and working tree, etc
extern "git diff" [
commit: string@"nu-complete git switchable branches with head" # commit to diff with
--abbrev # Show only a partial prefix instead of the full 40-byte hexadecimal object name
--binary # Output a binary diff that can be applied with "git-apply
--check # Warn if changes introduce conflict markers or whitespace errors
--color # Show colored diff
--color-moved # Moved lines of code are colored differently
--color-words # Equivalent to --word-diff=color plus --word-diff-regex=<regex>
--compact-summary # Output a condensed summary of extended header information
--dst-prefix # Show the given destination prefix instead of "b/
--ext-diff # Allow an external diff helper to be executed
--find-copies-harder # Inspect unmodified files as candidates for the source of copy
--find-object # Look for differences that change the number of occurrences of the object
--full-index # Show the full pre- and post-image blob object names on the "index" line
--histogram # Generate a diff using the "histogram diff" algorithm
--ignore-blank-lines # Ignore changes whose lines are all blank
--ignore-cr-at-eol # Ignore carrige-return at the end of line when doing a comparison
--ignore-space-at-eol # Ignore changes in whitespace at EOL
--indent-heuristic # Enable the heuristic that shift diff hunk boundaries
--inter-hunk-context # Show the context between diff hunks, up to the specified number of lines
--ita-invisible-in-index # Make the entry appear as a new file in "git diff" and non-existent in "git diff -l cached
--line-prefix # Prepend an additional prefix to every line of output
--minimal # Spend extra time to make sure the smallest possible diff is produced
--name-only # Show only names of changed files
--name-status # Show only names and status of changed files
--no-color # Turn off colored diff
--no-ext-diff # Disallow external diff drivers
--no-indent-heuristic # Disable the indent heuristic
--no-prefix # Do not show any source or destination prefix
--no-renames # Turn off rename detection
--no-textconv # Disallow external text conversion filters to be run when comparing binary files
--numstat # Shows number of added/deleted lines in decimal notation
--patch-with-raw # Synonym for -p --raw
--patch-with-stat # Synonym for -p --stat
--patience # Generate a diff using the "patience diff" algorithm
--pickaxe-all # When -S or -G finds a change, show all the changes in that changeset
--pickaxe-regex # Treat the <string> given to -S as an extended POSIX regular expression to match
--relative # Exclude changes outside the directory and show relative pathnames
--shortstat # Output only the last line of the --stat format containing total number of modified files
--src-prefix # Show the given source prefix instead of "a/
--stat # Generate a diffstat
--stat # Generate a diffstat
--summary # Output a condensed summary of extended header information
--textconv # Allow external text conversion filters to be run when comparing binary files
--word-diff # Show a word diff
--word-diff-regex # Use <regex> to decide what a word is
--text(-a) # Treat all files as text
--break-rewrites(-B) # Break complete rewrite changes into pairs of delete and create
--ignore-space-change(-b) # Ignore changes in amount of whitespace
--find-copies(-C) # Detect copies as well as renames
--irreversible-delete(-D) # Omit the preimage for deletes
--find-renames(-M) # Detect and report renames
--function-context(-W) # Show whole surrounding functions of changes
--ignore-all-space(-w) # Ignore whitespace when comparing lines
--anchored # Generate a diff using the "anchored diff" algorithm
--cached # Show diff of changes in the index
--staged # Show diff of changes in the index
--no-index # Compare two paths on the filesystem
--exit-code # Exit with 1 if there were differences or 0 if no differences
--quiet # Disable all output of the program, implies --exit-code
--base(-1) # Compare the working tree with the "base" version
--ours(-2) # Compare the working tree with the "our branch
--theirs(-3) # Compare the working tree with the "their branch
--cached # Visually show diff of changes in the index
--gui(-g) # Use `diff.guitool` instead of `diff.tool`
--dir-diff(-d) # Perform a full-directory diff
--prompt # Prompt before each invocation of the diff tool
--no-prompt(-y) # Do not prompt before launching a diff tool
--symlinks # Use symlinks in dir-diff mode
--tool-help # Print a list of diff tools that may be used with `--tool`
--trust-exit-code # Exit when an invoked diff tool returns a non-zero exit code
--extcmd(-x) # Specify a custom command for viewing diffs
--no-gui # Overrides --gui setting
--creation-factor # Percentage by which creation is weighted
--no-dual-color # Use simple diff colors
...args
]
### FROM AUTOCOMPLETIONS https://github.com/nushell/nu_scripts/tree/main/custom-completions/auto-generate
### Please fix these if they are wrong
# Display the manual of a git command
extern "git" [
...args
]
# Rewrite branches
extern "git filter-branch" [
--env-filter # This filter may be used if you only need to modify the environment
--tree-filter # This is the filter for rewriting the tree and its contents
--index-filter # This is the filter for rewriting the index
--parent-filter # This is the filter for rewriting the commit
--msg-filter # This is the filter for rewriting the commit messages
--commit-filter # This is the filter for performing the commit
--tag-name-filter # This is the filter for rewriting tag names
--subdirectory-filter # Only look at the history which touches the given subdirectory
--prune-empty # Ignore empty commits generated by filters
--original # Use this option to set the namespace where the original commits will be stored
--force(-f) # Filter even with refs in refs/original or existing temp directory
...args
]
# Manage set of tracked repositories
extern "git remote" [
--verbose(-v) # Be verbose
--tags # Import every tag from a remote with git fetch <name>
--no-tags # Don't import tags from a remote with git fetch <name>
--add # Add to the list of currently tracked branches instead of replacing it
--push # Manipulate push URLs instead of fetch URLs
--add # Add new URL instead of changing the existing URLs
--delete # Remove URLs that match specified URL
--push # Query push URLs rather than fetch URLs
--all # All URLs for the remote will be listed
--dry-run # Report what will be pruned but do not actually prune it
--prune # Prune all remotes that are updated
...args
]
# Adds a new remote
extern "git add" [
--tags # Import every tag from a remote with git fetch <name>
--no-tags # Don't import tags from a remote with git fetch <name>
--dry-run(-n) # Don't actually add the file(s)
--verbose(-v) # Be verbose
--force(-f) # Allow adding otherwise ignored files
--interactive(-i) # Interactive mode
--patch(-p) # Interactively choose hunks to stage
--edit(-e) # Manually create a patch
--update(-u) # Only match tracked files
--all(-A) # Match files both in working tree and index
--intent-to-add(-N) # Record only the fact that the path will be added later
--refresh # Don't add the file(s), but only refresh their stat
--chmod
--ignore-errors # Ignore errors
--ignore-missing # Check if any of the given files would be ignored
--force(-f) # Overwrite existing notes
--allow-empty # Allow empty note
--force(-f) # Override safeguards
--detach # Detach HEAD in the new working tree
--checkout # Checkout <commit-ish> after creating working tree
--no-checkout # Suppress checkout
--guess-remote
--no-guess-remote
--track # Mark <commit-ish> as "upstream" from the new branch
--no-track # Dont mark <commit-ish> as "upstream" from the new branch
--lock # Lock working tree after creation
--quiet(-q) # Suppress feedback messages
--force # Also add ignored submodule path
...args
]
# Removes a remote
extern "git rm" [
----term-good # Print the term for the old state
----term-bad # Print the term for the new state
--cached # Unstage files from the index
--ignore-unmatch # Exit with a zero status even if no files matched
--quiet(-q) # Be quiet
--force(-f) # Override the up-to-date check
--dry-run(-n) # Dry run
--sparse # Allow updating index entries outside of the sparse-checkout cone
--output-directory(-o)
--no-stat(-p) # Generate plain patches without diffstat
--no-patch(-s) # Suppress diff output
--minimal # Spend more time to create smaller diffs
--patience # Generate diff with the 'patience' algorithm
--histogram # Generate diff with the 'histogram' algorithm
--stdout # Print all commits to stdout in mbox format
--numstat # Show number of added/deleted lines in decimal notation
--shortstat # Output only last line of the stat
--summary # Output a condensed summary of extended header information
--no-renames # Disable rename detection
--full-index # Show full blob object names
--binary # Output a binary diff for use with git apply
--find-copies-harder # Also inspect unmodified files as source for a copy
--text(-a) # Treat all files as text
--ignore-space-at-eol # Ignore changes in whitespace at EOL
--ignore-space-change(-b) # Ignore changes in amount of whitespace
--ignore-all-space(-w) # Ignore whitespace when comparing lines
--ignore-blank-lines # Ignore changes whose lines are all blank
--function-context(-W) # Show whole surrounding functions of changes
--ext-diff # Allow an external diff helper to be executed
--no-ext-diff # Disallow external diff helpers
--no-textconv # Disallow external text conversion filters for binary files (Default)
--textconv # Allow external filters for binary files (Resulting diff is unappliable)
--no-prefix # Do not show source or destination prefix
--numbered(-n) # Name output in [Patch n/m] format, even with a single patch
--no-numbered(-N) # Name output in [Patch] format, even with multiple patches
...args
]
# Removes a remote
extern "git remove" [
--stdin # Read object names from stdin
--verbose(-v) # Be more verbose
--quiet(-q) # Operate quietly
--ignore-missing # Do not throw error on deleting non-existing object note
--force(-f) # Override safeguards
...args
]
# Shows a remote
extern "git show" [
--abbrev # Show only a partial prefix instead of the full 40-byte hexadecimal object name
--binary # Output a binary diff that can be applied with "git-apply
--check # Warn if changes introduce conflict markers or whitespace errors
--color # Show colored diff
--color-moved # Moved lines of code are colored differently
--color-words # Equivalent to --word-diff=color plus --word-diff-regex=<regex>
--compact-summary # Output a condensed summary of extended header information
--dst-prefix # Show the given destination prefix instead of "b/
--ext-diff # Allow an external diff helper to be executed
--find-copies-harder # Inspect unmodified files as candidates for the source of copy
--find-object # Look for differences that change the number of occurrences of the object
--full-index # Show the full pre- and post-image blob object names on the "index" line
--histogram # Generate a diff using the "histogram diff" algorithm
--ignore-blank-lines # Ignore changes whose lines are all blank
--ignore-cr-at-eol # Ignore carrige-return at the end of line when doing a comparison
--ignore-space-at-eol # Ignore changes in whitespace at EOL
--indent-heuristic # Enable the heuristic that shift diff hunk boundaries
--inter-hunk-context # Show the context between diff hunks, up to the specified number of lines
--ita-invisible-in-index # Make the entry appear as a new file in "git diff" and non-existent in "git diff -l cached
--line-prefix # Prepend an additional prefix to every line of output
--minimal # Spend extra time to make sure the smallest possible diff is produced
--name-only # Show only names of changed files
--name-status # Show only names and status of changed files
--no-color # Turn off colored diff
--no-ext-diff # Disallow external diff drivers
--no-indent-heuristic # Disable the indent heuristic
--no-prefix # Do not show any source or destination prefix
--no-renames # Turn off rename detection
--no-textconv # Disallow external text conversion filters to be run when comparing binary files
--numstat # Shows number of added/deleted lines in decimal notation
--patch-with-raw # Synonym for -p --raw
--patch-with-stat # Synonym for -p --stat
--patience # Generate a diff using the "patience diff" algorithm
--pickaxe-all # When -S or -G finds a change, show all the changes in that changeset
--pickaxe-regex # Treat the <string> given to -S as an extended POSIX regular expression to match
--relative # Exclude changes outside the directory and show relative pathnames
--shortstat # Output only the last line of the --stat format containing total number of modified files
--src-prefix # Show the given source prefix instead of "a/
--stat # Generate a diffstat
--stat # Generate a diffstat
--summary # Output a condensed summary of extended header information
--textconv # Allow external text conversion filters to be run when comparing binary files
--word-diff # Show a word diff
--word-diff-regex # Use <regex> to decide what a word is
--text(-a) # Treat all files as text
--break-rewrites(-B) # Break complete rewrite changes into pairs of delete and create
--ignore-space-change(-b) # Ignore changes in amount of whitespace
--find-copies(-C) # Detect copies as well as renames
--irreversible-delete(-D) # Omit the preimage for deletes
--find-renames(-M) # Detect and report renames
--function-context(-W) # Show whole surrounding functions of changes
--ignore-all-space(-w) # Ignore whitespace when comparing lines
--anchored # Generate a diff using the "anchored diff" algorithm
--abbrev-commit # Show only a partial hexadecimal commit object name
--no-abbrev-commit # Show the full 40-byte hexadecimal commit object name
--oneline # Shorthand for "--pretty=oneline --abbrev-commit
--encoding # Re-code the commit log message in the encoding
--expand-tabs # Perform a tab expansion in the log message
--no-expand-tabs # Do not perform a tab expansion in the log message
--no-notes # Do not show notes
--no-patch(-s) # Suppress diff output
--show-signature # Check the validity of a signed commit object
--remotes(-r) # Shows the remote tracking branches
--all(-a) # Show both remote-tracking branches and local branches
--current # Includes the current branch to the list of revs to be shown
--topo-order # Makes commits appear in topological order
--date-order # Makes commits appear in date order
--sparse # Shows merges only reachable from one tip
--no-name # Do not show naming strings for each commit
--sha1-name # Name commits with unique prefix
--no-color # Turn off colored output
...args
]
# Deletes all stale tracking branches
extern "git prune" [
--dry-run # Report what will be pruned but do not actually prune it
--verbose(-v) # Be more verbose
--quiet(-q) # Operate quietly
--dry-run(-n) # Just report what it would remove
--verbose(-v) # Report all removed objects
--progress # Show progress
--dry-run(-n) # Do not remove anything
--verbose(-v) # Report all removals
...args
]
# Fetches updates
extern "git update" [
--prune # Prune all remotes that are updated
--init # Initialize all submodules
--checkout # Checkout the superproject's commit on a detached HEAD in the submodule
--merge # Merge the superproject's commit into the current branch of the submodule
--rebase # Rebase current branch onto the superproject's commit
--no-fetch(-N) # Don't fetch new objects from the remote
--remote # Instead of using superproject's SHA-1, use the state of the submodule's remote-tracking branch
--force # Discard local changes when switching to a different commit & always run checkout
--recursive # Traverse submodules recursively
...args
]
# Renames a remote
extern "git rename" [
...args
]
# Sets the default branch for a remote
extern "git set-head" [
...args
]
# Changes URLs for a remote
extern "git set-url" [
--push # Manipulate push URLs instead of fetch URLs
--add # Add new URL instead of changing the existing URLs
--delete # Remove URLs that match specified URL
...args
]
# Retrieves URLs for a remote
extern "git get-url" [
--push # Query push URLs rather than fetch URLs
--all # All URLs for the remote will be listed
...args
]
# Changes the list of branches tracked by a remote
extern "git set-branches" [
--add # Add to the list of currently tracked branches instead of replacing it
...args
]
# Shows the commits on branches
extern "git show-branch" [
--remotes(-r) # Shows the remote tracking branches
--all(-a) # Show both remote-tracking branches and local branches
--current # Includes the current branch to the list of revs to be shown
--topo-order # Makes commits appear in topological order
--date-order # Makes commits appear in date order
--sparse # Shows merges only reachable from one tip
--no-name # Do not show naming strings for each commit
--sha1-name # Name commits with unique prefix
--no-color # Turn off colored output
...args
]
# Apply a series of patches from a mailbox
extern "git am" [
--signoff(-s) # Add a Signed-off-By trailer to commit message
--keep-non-patch # Only strip bracket pairs containing PATCH
--no-keep-cr # Override am.keepcr to false
--scissors(-c) # Remove everything in body before scissors
--no-scissors # Ignore scissor lines
--no-messageid # Do not add message id to commit message
--quiet(-q) # Supress logs
--no-utf8 # Disable all charset re-encoding of metadata
--3way(-3) # Fall back to three way merge on patch failure
--no-3way # Do not fall back to three way merge on patch failure
--rerere-autoupdate # Allow rerere to update index if possible
--ignore-space-change # Pass --ignore-space-change to git apply
--reject # Pass --reject to git apply
--interactive(-i) # Run interactively
--commiter-date-is-author-date # Treat commiter date as author date
--ignore-date # Treat author date as commiter date
--skip # Skip current patch
--no-gpg-sign # Do not sign commits
--continue(-r) # Mark patch failures as resolved
--abort # Abort patch operation and restore branch
--quit # Abort without restoring branch
--show-current-patch # Show message at which patch failures occured
--ignore-whitespace # Ignore whitespace change in context lines
--message-id(-m) # Copy message id to the end of commit message
--keep-cr # Do not remove \\r from lines starting with \\n\\r
--root # Do not treat root commits as boundaries
--show-stats # Include additional statistics
--reverse # Walk history forward instead of backward
--porcelain(-p) # Show in a format designed for machine consumption
--line-porcelain # Show the porcelain format
--incremental # Show the result incrementally
--show-name(-f) # Show the filename in the original commit
--show-number(-n) # Show the line number in the original commit
--show-email(-e) # Show the author email instead of author name
...args
]
# Show message at which patch failures occured
extern "git diff raw" [
...args
]
# Apply a patch on a git index file and a working tree
extern "git apply" [
--stat # Generate a diffstat
--numstat # Show number of additions and deletions
--summary # Output a condensed summary
--check # Just check if the patches can be applied
--index # Apply patch to index and working tree
--cached # Apply patch to index
--intent-to-add # Add entry for file in index with no content
--3way(-3) # Attempt a 3 way merge on conflicts
--reverse(-R) # Apply the patch in reverse
--reject # Leave rejected hunks in *.rej files
--unidiff-zero # Do not break on diffs generated using --unified=0
--apply # Always apply patches
--no-add # Ignore additions made by patches
--binary # Also patch binaries
--ignore-whitespace # Ignore whitespace change in context lines
--inaccurate-eof # Work around some diff versions not detecting newlines at end of file
--verbose(-v) # Report progress to stderr
--recount # Do not trust the line counts in the hunk headers
--unsafe-paths # Allow patches that work outside working area
...args
]
# Create an archive of files from a named tree
extern "git archive" [
--list(-l) # Show all available formats
--verbose(-v) # Be verbose
--worktree-attributes # Look for attributes in .gitattributes files in the working tree as well
...args
]
# Find the change that introduced a bug by binary search
extern "git bisect" [
--no-checkout # Do not checkout tree, only update BISECT_HEAD
--first-parent # On merge commits, follow only the first parent commit
----term-good # Print the term for the old state
----term-bad # Print the term for the new state
...args
]
# Find commits yet to be applied to upstream [upstream [head]]
extern "git cherry" [
--edit(-e) # Edit the commit message prior to committing
--no-commit(-n) # Apply changes without making any commit
--signoff(-s) # Add Signed-off-by line to the commit message
--ff # Fast-forward if possible
--continue # Continue the operation in progress
--abort # Cancel the operation
--skip # Skip the current commit and continue with the rest of the sequence
...args
]
# Clone a repository into a new directory
extern "git clone" [
--no-hardlinks # Copy files instead of using hardlinks
--quiet(-q) # Operate quietly and do not report progress
--verbose(-v) # Provide more information on what is going on
--no-checkout(-n) # No checkout of HEAD is performed after the clone is complete
--bare # Make a bare Git repository
--mirror # Set up a mirror of the source repository
--origin(-o) # Use a specific name of the remote instead of the default
--branch(-b) # Use a specific branch instead of the one used by the cloned repository
--depth # Truncate the history to a specified number of revisions
--recursive # Initialize all submodules within the cloned repository
...args
]
# Record changes to the repository
extern "git commit" [
--amend # Amend the log message of the last commit
--all(-a) # Automatically stage modified and deleted files
--patch(-p) # Use interactive patch selection interface
--fixup # Fixup commit to be used with rebase --autosquash
--squash # Squash commit to be used with rebase --autosquash
--reset-author # When amending, reset author of commit to the committer
--no-edit # Use the selected commit message without launching an editor
--no-gpg-sign # Do not sign commit
--no-verify(-n) # Do not run pre-commit and commit-msg hooks
--allow-empty # Create a commit with no changes
--allow-empty-message # Create a commit with no commit message
--signoff(-s) # Append Signed-off-by trailer to commit message
--no-signoff # Do not append Signed-off-by trailer to commit message
...args
]
# Count unpacked number of objects and their disk consumption
extern "git count-objects" [
--verbose(-v) # Be verbose
--human-readable(-H) # Print in human readable format
...args
]
# A really simple server for git repositories
extern "git daemon" [
--strict-paths # Match paths exactly
--base-path-relaxed # When looking up with base path fails, try without it
--export-all # Allow pulling from all directories
--inetd # Run as inetd service
--syslog # --log-destination=syslog
--verbose # Log all details
--reuseaddr # Reuse address when binding to listening server
--detach # Detach from shell
--informative-errors # Report more verbose errors to clients
--no-informative-errors # Report less verbose errors to clients
...args
]
# Give an object a human readable name based on an available ref
extern "git describe" [
--dirty # Describe the state of the working tree, append dirty if there are local changes
--broken # Describe the state of the working tree, append -broken instead of erroring
--all # Use all tags, not just annotated
--tags # Use all commits/tags, not just annotated tags
--contains # Find the tag that comes after the commit
--abbrev # Use <n> digits, or as many digits as needed to form a unique object name
--candidates # Consider up to <n> candidates
--exact-match # Only output exact matches
--debug # Display debug info
--long # Always output the long format
--match # Only consider tags matching the given glob pattern
--exclude # Do not consider tags matching the given glob pattern
--always # Show uniquely abbreviated commit object as fallback
--first-parent # Follow only the first parent of a merge commit
...args
]
# Open diffs in a visual tool
extern "git difftool" [
--cached # Visually show diff of changes in the index
--gui(-g) # Use `diff.guitool` instead of `diff.tool`
--dir-diff(-d) # Perform a full-directory diff
--prompt # Prompt before each invocation of the diff tool
--no-prompt(-y) # Do not prompt before launching a diff tool
--symlinks # Use symlinks in dir-diff mode
--tool-help # Print a list of diff tools that may be used with `--tool`
--trust-exit-code # Exit when an invoked diff tool returns a non-zero exit code
--extcmd(-x) # Specify a custom command for viewing diffs
--no-gui # Overrides --gui setting
...args
]
# Cleanup unnecessary files and optimize the local repository
extern "git gc" [
--aggressive # Aggressively optimize the repository
--auto # Checks any housekeeping is required and then run
--prune # Prune loose objects older than date
--no-prune # Do not prune any loose objects
--quiet # Be quiet
--force # Force `git gc` to run
--keep-largest-pack # Ignore `gc.bigPackThreshold`
...args
]
# Print lines matching a pattern
extern "git grep" [
--cached # Search blobs registered in the index file
--no-index # Search files in the current directory not managed by Git
--untracked # Search also in untracked files
--no-exclude-standard # Also search in ignored files by not honoring the .gitignore mechanism
--exclude-standard # Do not search ignored files specified via the .gitignore mechanism
--recurse-submodules # Recursively search in each submodule that is active and checked out in the repository
--text(-a) # Process binary files as if they were text
--textconv # Honor textconv filter settings
--no-textconv # Do not honor textconv filter settings
--ignore-case(-i) # Ignore case differences between the patterns and the files
--recursive(-r) # Descend into levels of directories endlessly
--no-recursive # Do not descend into directories
--word-regexp(-w) # Match the pattern only at word boundary
--invert-match(-v) # Select non-matching lines
--full-name # Forces paths to be output relative to the project top directory
--extended-regexp(-E) # Use POSIX extended regexp for patterns
--basic-regexp(-G) # Use POSIX basic regexp for patterns
--perl-regexp(-P) # Use Perl-compatible regular expressions for patterns
--fixed-strings(-F) # Dont interpret pattern as a regex
--line-number(-n) # Prefix the line number to matching lines
--column # Prefix the 1-indexed byte-offset of the first match from the start of the matching line
--files-with-matches(-l) # Show only the names of files that contain matches
--files-without-match(-L) # Show only the names of files that do not contain matches
--null(-z) # Use \\0 as the delimiter for pathnames in the output, and print them verbatim
--only-matching(-o) # Print only the matched parts of a matching line
--count(-c) # Instead of showing every matched line, show the number of lines that match
--no-color # Turn off match highlighting, even when the configuration file gives the default to color output
--break # Print an empty line between matches from different files
--heading # Show the filename above the matches in that file instead of at the start of each shown line
--show-function(-p) # Show the line that contains the function name of the match, unless the match is a function name itself
--function-context(-W) # Show the surrounding text from the line containing a function name up to the one before the next function name
--and # Combine patterns using and
--or # Combine patterns using or
--not # Combine patterns using not
--all-match # Only match files that can match all the pattern expressions when giving multiple
--quiet(-q) # Just exit with status 0 when there is a match and with non-zero status when there isnt
...args
]
# Create an empty git repository or reinitialize an existing one
extern "git init" [
--quiet(-q) # Only print error and warning messages
--bare # Create a bare repository
--force # Remove even with local changes
--all # Remove all submodules
...args
]
# Show commit shortlog
extern "git shortlog" [
...args
]
# Show commit logs
extern "git log" [
--dst-prefix # Show the given destination prefix instead of "b/
--inter-hunk-context # Show the context between diff hunks, up to the specified number of lines
--ita-invisible-in-index # Make the entry appear as a new file in "git diff" and non-existent in "git diff -l cached
--line-prefix # Prepend an additional prefix to every line of output
--no-prefix # Do not show any source or destination prefix
--pickaxe-all # When -S or -G finds a change, show all the changes in that changeset
--pickaxe-regex # Treat the <string> given to -S as an extended POSIX regular expression to match
--relative # Exclude changes outside the directory and show relative pathnames
--src-prefix # Show the given source prefix instead of "a/
--text(-a) # Treat all files as text
--break-rewrites(-B) # Break complete rewrite changes into pairs of delete and create
--find-copies(-C) # Detect copies as well as renames
--irreversible-delete(-D) # Omit the preimage for deletes
--find-renames(-M) # Detect and report renames
--follow # Continue listing file history beyond renames
--no-decorate # Dont print ref names
--decorate # Print out ref names
--source # Print ref name by which each commit was reached
--use-mailmap
--full-diff
--log-size
--all-match # Limit commits to ones that match all given --grep
--invert-grep # Limit commits to ones with message that dont match --grep
--regexp-ignore-case(-i) # Case insensitive match
--basic-regexp # Patterns are basic regular expressions (default)
--extended-regexp(-E) # Patterns are extended regular expressions
--fixed-strings(-F) # Patterns are fixed strings
--perl-regexp # Patterns are Perl-compatible regular expressions
--remove-empty # Stop when given path disappears from tree
--merges # Print only merge commits
--no-merges # Dont print commits with more than one parent
--no-min-parents # Show only commit without a minimum number of parents
--no-max-parents # Show only commit without a maximum number of parents
--first-parent # Follow only the first parent commit upon seeing a merge commit
--not # Reverse meaning of ^ prefix
--all # Show log for all branches, tags, and remotes
--branches # Show log for all matching branches
--tags # Show log for all matching tags
--remotes # Show log for all matching remotes
--reflog # Show log for all reflogs entries
--ingnore-missing # Ignore invalid object names
--bisect
--stdin # Read commits from stdin
--cherry-mark # Mark equivalent commits with = and inequivalent with +
--cherry-pick # Omit equivalent commits
--left-only
--rigth-only
--cherry
--walk-reflogs(-g)
--merge
--boundary
--simplify-by-decoration
--full-history
--dense
--sparse
--simplify-merges
--ancestry-path
--date-order
--author-date-order
--topo-order
--reverse
--no-walk
--do-walk
--format
--abbrev-commit
--no-abbrev-commit
--oneline
--expand-tabs
--no-expand-tabs
--notes
--no-notes
--show-notes
--standard-notes
--no-standard-notes
--show-signature
--relative-date
--parents
--children
--left-right
--graph
--show-linear-break
--cc
--patch(-p)
--no-patch(-s)
--raw
--patch-with-raw
--indent-heuristic
--no-indent-heuristic
--compaction-heuristic
--no-compaction-heuristic
--minimal
--patience
--histogram
--numstat
--shortstat
--summary
--patch-with-stat
--name-only
--name-status
--color
--no-color
--word-diff
--color-words
--no-renames
--check
--full-index
--binary
--abbrev
--find-copies-harder # Also inspect unmodified files as source for a copy
--ignore-space-at-eol # Ignore changes in whitespace at EOL
--ignore-space-change(-b) # Ignore changes in amount of whitespace
--ignore-all-space(-w) # Ignore whitespace when comparing lines
--ignore-blank-lines # Ignore changes whose lines are all blank
--function-context(-W) # Show whole surrounding functions of changes
--ext-diff # Allow an external diff helper to be executed
--no-ext-diff # Disallow external diff helpers
--no-textconv # Disallow external text conversion filters for binary files (Default)
--textconv # Allow external filters for binary files (Resulting diff is unappliable)
--no-prefix # Do not show source or destination prefix
...args
]
#
extern "git sorted unsorted" [
...args
]
#
extern "git always never auto" [
...args
]
# Show information about files in the index and the working tree
extern "git ls-files" [
--cached(-c) # Show cached files in the output