diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-05-08 10:18:45 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-08 10:18:45 -0700 |
| commit | 2c34e4e747261bd32cd8d5a4fb844cf97aec5fb9 (patch) | |
| tree | d628b270609049b00ad6c1ab61606b9996df280b /t/t9902-completion.sh | |
| parent | f526a4f3142de772bdd2d0dbd4710e401f603a5c (diff) | |
| parent | 6b7c45e8c9f7e6b6a602b9ba0727073573da552f (diff) | |
| download | git-2c34e4e747261bd32cd8d5a4fb844cf97aec5fb9.tar.xz | |
Merge branch 'rh/complete-symbolic-ref'
Command line completion script (in contrib/) learned to complete
"git symbolic-ref" a bit better (you need to enable plumbing
commands to be completed with GIT_COMPLETION_SHOW_ALL_COMMANDS).
* rh/complete-symbolic-ref:
completion: add docs on how to add subcommand completions
completion: improve docs for using __git_complete
completion: add 'symbolic-ref'
Diffstat (limited to 't/t9902-completion.sh')
| -rwxr-xr-x | t/t9902-completion.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 569cf23104..963f865f27 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -2518,6 +2518,29 @@ test_expect_success 'complete tree filename with metacharacters' ' EOF ' +test_expect_success 'symbolic-ref completes builtin options' ' + test_completion "git symbolic-ref --d" <<-\EOF + --delete Z + EOF +' + +test_expect_success 'symbolic-ref completes short ref names' ' + test_completion "git symbolic-ref foo m" <<-\EOF + main Z + mybranch Z + mytag Z + EOF +' + +test_expect_success 'symbolic-ref completes full ref names' ' + test_completion "git symbolic-ref foo refs/" <<-\EOF + refs/heads/main Z + refs/heads/mybranch Z + refs/tags/mytag Z + refs/tags/A Z + EOF +' + test_expect_success PERL 'send-email' ' test_completion "git send-email --cov" <<-\EOF && --cover-from-description=Z |
