public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm•com>
To: Robin Rosenberg <robin.rosenberg@dewire•com>
Cc: Eran Tromer <git2eran@tromer•org>, git@vger•kernel.org
Subject: Re: [PATCH] Bash snippet to show branch and patch in bash prompt
Date: Mon, 30 Oct 2006 10:46:32 +0000	[thread overview]
Message-ID: <tnxhcxm2i9j.fsf@arm.com> (raw)
In-Reply-To: <20061030104225.11875.57076.stgit@lathund.dewire.com> (Robin Rosenberg's message of "Mon, 30 Oct 2006 11:42:25 +0100")

Robin Rosenberg <robin.rosenberg@dewire•com> wrote:
> From: Robin Rosenberg <robin.rosenberg@dewire•com>
>
> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire•com>
> ---
>
>  contrib/stgbashprompt.sh |   16 ++++++++++++++++
>  1 files changed, 16 insertions(+), 0 deletions(-)
>
> diff --git a/contrib/stgbashprompt.sh b/contrib/stgbashprompt.sh
> new file mode 100755
> index 0000000..792da53
> --- /dev/null
> +++ b/contrib/stgbashprompt.sh
> @@ -0,0 +1,16 @@
> +# include this in your bashrc or copy to /etc/bash_completions.d
> +
> +if [ "$PS1" ]; then
> +    # trap 'PS1="\u@\h [$(stg top)] \w]\$ "' DEBUG
> +    function stgtag
> +    {
> +	br=$(stg branch 2>/dev/null)
> +	top=$(stg top 2>/dev/null)
> +	if [[ -n "$br$top" ]];then
> +	    echo "[$top@$br]"
> +	    return
> +	fi
> +    }
> +    PS1='\u@\h$(stgtag)\w\$ '
> +
> +fi

Isn't this the same patch? "stg refresh" :-)?

-- 
Catalin

P.S. could you please send them to my catalin.marinas@gmail•com

  reply	other threads:[~2006-10-30 10:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-30 10:42 [PATCH] Bash snippet to show branch and patch in bash prompt Robin Rosenberg
2006-10-30 10:46 ` Catalin Marinas [this message]
2006-10-30 10:57 ` Robin Rosenberg
2006-10-30 10:59 ` Robin Rosenberg
  -- strict thread matches above, loose matches on Subject: below --
2006-10-30  9:57 [StGIT PATCH] " Eran Tromer
2006-10-30 10:59 ` [PATCH] " Robin Rosenberg
2006-10-30 15:03   ` Eran Tromer
2006-11-02 11:24     ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tnxhcxm2i9j.fsf@arm.com \
    --to=catalin.marinas@arm$(echo .)com \
    --cc=catalin.marinas@gmail$(echo .)com \
    --cc=git2eran@tromer$(echo .)org \
    --cc=git@vger$(echo .)kernel.org \
    --cc=robin.rosenberg@dewire$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox