Re: [PATCH] Add __git_ps1_pc to use as PROMPT_COMMAND

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

 



Simon Oosthoek <soosthoek@xxxxxxxxxxxx> writes:

> +# __git_ps1_pc accepts 0 arguments (for now)
> +# It is meant to be used as PROMPT_COMMAND, it sets PS1
> +__git_ps1_pc ()
> +{
> +	local g="$(__gitdir)"
> +	if [ -n "$g" ]; then
> +...
> +	fi
> +}

This looks awfully similar to the existing code in __git_ps1
function.  Without refactoring to share the logic between them, it
won't be maintainable.
--
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]