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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas Rast <trast@xxxxxxxxxxxxxxx> writes:

> Add some more git-log options to the gitk completion.  Not all of them
> make sense, unfortunately.
>
> Signed-off-by: Thomas Rast <trast@xxxxxxxxxxxxxxx>
> ---
>
> 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.

> +		__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.

>  		return
>  		;;
>  	esac
> -- 
> 1.6.2.rc0.293.g947001
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux