git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] bash completion: offer more options for gitk

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 15, 2009, 09:33 UTC
Message-ID
<7vfxigniws.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1234641270-14342-1-git-send-email-trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
Show 13 quoted lines
> Add some more git-log options to the gitk completion.  Not all of them
> make sense, unfortunately.
>
> Signed-off-by: Thomas Rast <trast@student.ethz.ch>
> ---
>
> I was simply too lazy to keep typing --simplify-by-decoration.
>
> I made two passes over the git-log manpage and simply selected all
> options that seemed to make sense, _seemed_ to work, and that didn't
> mangle the history view in horrible ways (such as disconnecting it
> into little pieces).  It does handle --left-right correctly, very
> nice!

The --left-right support in gitk was done in tandem with the low-level support.

Show 9 quoted lines
> +		__gitcomp "
> +			--not --all $merge
> +			--branches --tags --remotes
> +			--first-parent
> +			--dense --sparse --full-history
> +			--simplify-merges --simplify-by-decoration
> +			--since= --after= --until= --before=
> +			--left-right
> +			"

Many options you add here are useful for git-log and not present in its completion, but as you point out not all git-log options necessarily make sense for gitk. I think it would make sense to introduce an extra variable $__git_log_basic_options that holds the basic ones that can be in both, and add the ones that are specific to gitk or git-log in their own completion functions. I suspect gitk's addition will be nil, while git-log would add --graph, --walk-reflogs and --no-merges to the basic set.

Show 5 quoted lines
>  		return
>  		;;
>  	esac
> -- 
> 1.6.2.rc0.293.g947001
Previous: Thomas RastNext: Santi Béjar
Message 2 of 26 in “bash completion: offer more options for gitk”
  1. bash completion: offer more options for gitkThomas Rast, Feb 14, 2009
  2. Junio C HamanoFeb 15, 2009
  3. Santi BéjarFeb 15, 2009
  4. 0/2 bash completion: more options for gitk/log/shortlogThomas Rast, Feb 16, 2009
  5. Thomas RastFeb 16, 2009
  6. format-patch: thread as reply to cover letter even with in-reply-toThomas Rast, Feb 16, 2009
  7. Jay SoffianFeb 16, 2009
  8. Thomas RastFeb 16, 2009
  9. Jakub NarebskiFeb 16, 2009
  10. Thomas RastFeb 16, 2009
  11. 0/4 format-patch --cover-letter --in-reply-toThomas Rast, Feb 19, 2009
  12. 1/4 format-patch: threading test reactivationThomas Rast, Feb 19, 2009
  13. 2/4 format-patch: track several referencesThomas Rast, Feb 19, 2009
  14. Daniel BarkalowFeb 19, 2009
  15. 0/4 format-patch --cover-letter --in-reply-toThomas Rast, Feb 20, 2009
  16. 1/4 format-patch: threading test reactivationThomas Rast, Feb 20, 2009
  17. 2/4 format-patch: track several referencesThomas Rast, Feb 20, 2009
  18. 3/4 format-patch: thread as reply to cover letter even with in-reply-toThomas Rast, Feb 20, 2009
  19. 4/4 format-patch: support deep threadingThomas Rast, Feb 20, 2009
  20. Junio C HamanoFeb 22, 2009
  21. 3/4 format-patch: thread as reply to cover letter even with in-reply-toThomas Rast, Feb 19, 2009
  22. 4/4 format-patch: support deep threadingThomas Rast, Feb 19, 2009
  23. 1/2 bash completion: refactor common log, shortlog and gitk optionsThomas Rast, Feb 16, 2009
  24. 2/2 bash completion: only show 'log --merge' if mergingThomas Rast, Feb 16, 2009
  25. Shawn O. PearceFeb 18, 2009
  26. Junio C HamanoFeb 18, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.