From owner-freebsd-git@freebsd.org Fri Dec 4 14:20:18 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 4C36BA41F88 for ; Fri, 4 Dec 2015 14:20:18 +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 1983F1F4A for ; Fri, 4 Dec 2015 14:20:18 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: by iofh3 with SMTP id h3so117309904iof.3 for ; Fri, 04 Dec 2015 06:20:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=8fK0h9vBbup00S4+estO3YSIRSeAjcKf+Qey0xzysMc=; b=L0thi4FvaJh0QJeWhn2MmhZnzNEb3b0rsHxYCP5rKvO9iEgtWwjayQLUWN3vdRiZRb Nn1XKFp5OgIYf1FhpWXbzs6qlMKaLTXWacMxZa8RrDv4DnOTmNJ/fa5VelEW0TJoV4qO m74YrJFmQRvyaybBje19UuXA6QXNYjYz58bwwMAnkH5FTAYD6awrT4V3JOmGP2bIOYUX hMUcgNpX9GcJpaaXa+d2vNHbY+VtXFWKy4WtGY/QipLLzneUPT7cZni6f4QdLHCr2Uwp Z+9BGPu2Fs0hioBW/7Y++YXf10/HYoXhTi/DjSHkQZN3JKF3lHkyhik9k3fLWwYfXX1g ewJw== MIME-Version: 1.0 X-Received: by 10.107.41.146 with SMTP id p140mr14158266iop.80.1449238817481; Fri, 04 Dec 2015 06:20:17 -0800 (PST) Sender: crodr001@gmail.com Received: by 10.50.152.69 with HTTP; Fri, 4 Dec 2015 06:20:17 -0800 (PST) Date: Fri, 4 Dec 2015 06:20:17 -0800 X-Google-Sender-Auth: quLInp0NHOS_MXLhChXDn5kCIMg Message-ID: Subject: Put working git branch in shell prompt for bash and zsh? From: Craig Rodrigues To: 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: Fri, 04 Dec 2015 14:20:18 -0000 Hi, I am heavily using git for my projects these days. Typically I am working on multiple projects, with multiple checked out trees. I am also switching between branches a lot. Sometimes because I am working with so many checked out trees, I lose track of what branch I am working on. Can anyone point me to a "stupid shell trick" which would put the currently active branch in the shell prompt? I typically use bash and zsh shells, so having the trick for those shells would be useful. Thank! -- Craig