From owner-freebsd-git@freebsd.org Sun Dec 6 12:55:48 2015 Return-Path: Delivered-To: freebsd-git@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18C7BA4AA for ; Sun, 6 Dec 2015 12:55:48 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DDCA01D0F; Sun, 6 Dec 2015 12:55:47 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: by iofh3 with SMTP id h3so157762535iof.3; Sun, 06 Dec 2015 04:55:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=mEuZ7gYlrpWrX3LfeqSOKh8RCkxpM57UIkbM7+G/N1Q=; b=I/Ob8LohaI6qAPDaJr1JcHTisCISBQ4UW4MHGfPlQKcpc+WYA3pScqr1PEfVk7axU2 mO3h1kY9wc4mdQpK8K+04k2SSrNRiXDCClULLM2bn2Vfyn2OlTAO9IIHfHe4mNdKARXq gQ1NZzs7XzREgZgoYO0A+uWcNjg9L1p8HYV7s8L9OgQF0zHGvgSCpP4H8k/pb7y3ngsn GzGEw1azwh6q5rYffMVYYnktCAHIlS++KXqsPSf0EyL7KFT29lcviAZCky5jN78xVeAu SqpzPKHJVKdwAatkM2ervFDAi1mhwTGOs7H3QN5hxgOfzpICBrhOPiCs0A2DDWnNCozZ 2VhA== MIME-Version: 1.0 X-Received: by 10.107.11.23 with SMTP id v23mr24765889ioi.184.1449406547358; Sun, 06 Dec 2015 04:55:47 -0800 (PST) Sender: crodr001@gmail.com Received: by 10.50.152.69 with HTTP; Sun, 6 Dec 2015 04:55:47 -0800 (PST) In-Reply-To: References: <5794E27D-73D5-4419-9351-52D45A5C7BFF@FreeBSD.org> Date: Sun, 6 Dec 2015 04:55:47 -0800 X-Google-Sender-Auth: PFWnPYfsNm8wdy09qE5VQIE322c Message-ID: Subject: Re: Put working git branch in shell prompt for bash and zsh? From: Craig Rodrigues To: Bartek Rutkowski Cc: freebsd-git@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion of git use in the FreeBSD project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2015 12:55:48 -0000 Bartek, Here are some further cool things I found from the minimal prompt in zprezto: GIT === (1) If a workspace has a modified file, which hasn't been checked in, that an orange circle appears in the prompt. (2) If a workspace has file that hasn't been added with 'git add', a red circle appears in the prompt. (3) If a workspace is in the middle of a 'git rebase', then 'rebase' appears in the prompt. (4) If a workspace is in the middle of a 'git cherry-pick', then 'cherry' appears in the prompt. SVN ==== (1) If you cd into a Subversion workspace, the branch and revision number are reflected in the prompt: ============================ ~ >> cd /usr/bin /usr/bin >> pwd /usr/bin /usr/bin >> cd /usr/src /usr/src - [10|291085] >> pwd /usr/src ============================ I am sure I can cutomize things more to get the prompt exactly as I like it, but that is amazing functionality out of the box. I love it! -- Craig