{"thread":{"id":"43409","subject":"Re: [PATCH] Bash snippet to show branch and patch in bash prompt","startedAt":"2006-10-30T10:42:25Z","lastAt":"2006-10-30T10:59:03Z","messageCount":4,"participants":["Robin Rosenberg","Catalin Marinas"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"294895","messageId":"20061030104225.11875.57076.stgit@lathund.dewire.com","threadId":"43409","inReplyTo":null,"subject":"[PATCH] Bash snippet to show branch and patch in bash prompt","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2006-10-30T10:42:25Z","receivedAt":"2006-10-30T10:42:25Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"From: Robin Rosenberg <robin.rosenberg@dewire.com>\n\nSigned-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n\n contrib/stgbashprompt.sh |   16 ++++++++++++++++\n 1 files changed, 16 insertions(+), 0 deletions(-)\n\ndiff --git a/contrib/stgbashprompt.sh b/contrib/stgbashprompt.sh\nnew file mode 100755\nindex 0000000..792da53\n--- /dev/null\n+++ b/contrib/stgbashprompt.sh\n@@ -0,0 +1,16 @@\n+# include this in your bashrc or copy to /etc/bash_completions.d\n+\n+if [ \"$PS1\" ]; then\n+    # trap 'PS1=\"\\u@\\h [$(stg top)] \\w]\\$ \"' DEBUG\n+    function stgtag\n+    {\n+\tbr=$(stg branch 2>/dev/null)\n+\ttop=$(stg top 2>/dev/null)\n+\tif [[ -n \"$br$top\" ]];then\n+\t    echo \"[$top@$br]\"\n+\t    return\n+\tfi\n+    }\n+    PS1='\\u@\\h$(stgtag)\\w\\$ '\n+\n"},{"id":"295821","messageId":"tnxhcxm2i9j.fsf@arm.com","threadId":"43409","inReplyTo":"20061030104225.11875.57076.stgit@lathund.dewire.com","subject":"Re: [PATCH] Bash snippet to show branch and patch in bash prompt","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@arm.com","sentAt":"2006-10-30T10:46:32Z","receivedAt":"2006-10-30T10:46:32Z","isPatch":true,"sender":{"key":"catalin.marinas@arm.com","avatar":null},"body":"Robin Rosenberg <robin.rosenberg@dewire.com> wrote:\n> From: Robin Rosenberg <robin.rosenberg@dewire.com>\n>\n> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n> ---\n>\n>  contrib/stgbashprompt.sh |   16 ++++++++++++++++\n>  1 files changed, 16 insertions(+), 0 deletions(-)\n>\n> diff --git a/contrib/stgbashprompt.sh b/contrib/stgbashprompt.sh\n> new file mode 100755\n> index 0000000..792da53\n> --- /dev/null\n> +++ b/contrib/stgbashprompt.sh\n> @@ -0,0 +1,16 @@\n> +# include this in your bashrc or copy to /etc/bash_completions.d\n> +\n> +if [ \"$PS1\" ]; then\n> +    # trap 'PS1=\"\\u@\\h [$(stg top)] \\w]\\$ \"' DEBUG\n> +    function stgtag\n> +    {\n> +\tbr=$(stg branch 2>/dev/null)\n> +\ttop=$(stg top 2>/dev/null)\n> +\tif [[ -n \"$br$top\" ]];then\n> +\t    echo \"[$top@$br]\"\n> +\t    return\n> +\tfi\n> +    }\n> +    PS1='\\u@\\h$(stgtag)\\w\\$ '\n> +\n> +fi\n\nIsn't this the same patch? \"stg refresh\" :-)?\n\n-- \nCatalin\n\nP.S. could you please send them to my catalin.marinas@gmail.com\n"},{"id":"294651","messageId":"200610301157.43702.robin.rosenberg.lists@dewire.com","threadId":"43409","inReplyTo":"20061030104225.11875.57076.stgit@lathund.dewire.com","subject":"Re: [PATCH] Bash snippet to show branch and patch in bash prompt","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2006-10-30T10:57:42Z","receivedAt":"2006-10-30T10:57:42Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"måndag 30 oktober 2006 11:42 skrev Robin Rosenberg:\n> From: Robin Rosenberg <robin.rosenberg@dewire.com>\n>\n> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n\nThis was a \"reply\" using stgit, but the reference missed the ange brackets. \n\nAnyway thanks for the feedback on the prompt.\n\n-- robin\n"},{"id":"296038","messageId":"200610301159.03654.robin.rosenberg.lists@dewire.com","threadId":"43409","inReplyTo":"20061030104225.11875.57076.stgit@lathund.dewire.com","subject":"Re: [PATCH] Bash snippet to show branch and patch in bash prompt","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2006-10-30T10:59:03Z","receivedAt":"2006-10-30T10:59:03Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"Oops, didn't refresh before sending.. \n\n"}]}