DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 57UDD7Ce1924023 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 57UDD7Ce1924023 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=ImQEL1qs X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B53C73858C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1756559584; bh=Ag76eIn2izQGxBNKLYeZsw7tuNrROumibk+a95SK7lI=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ImQEL1qshMoVgoPcdbeNt+82Jmt2eO+RfRSAIpRsotg6mwBqEfIiXQfZPOPScKOgQ RZI30pczJu4Zaped7v7SKUqJt6qZmSXNMuhL1N1ylQUqvlfKlnyOqpDFIRmmld/jlw MnYca31th3bWuAHufUQrRvDoEMuj0FA8dWhNLA6c= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B766E3858D37 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B766E3858D37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1756559518; cv=none; b=P6q40TJjH/rjILELYknDGjuk+F2DNHEuqDg4AYFdBuXpzQkpr9MwpPTdg4IwxGZCiqVYYyi0Er6HNeCrvn4UXV4jtf+IzqCfBZ1TFHj2to00o8KXadtEtXv7cG1/8pAMd2oQUweQvH6q3HROdhBczmq2rbRmmRQB04BHkTHb5x0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1756559518; c=relaxed/simple; bh=daCn1bKE0859gg6FSgmLj++g3q27GPZvZ6Kk8uocchg=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=Mt0hkMcysP7XKnc+Hgdmk0lRu2tI71f0TCYbvZp4TKcjMnhOrn9FGTY15Ohm8ybrNekdi0EADoWZ0WYaF0nU49ykytGyBdYI9JiVKt+CWuB5m+xa1PAdkgJM1ZMb+rGG2pHGD6sxY5gbu1x9SZIP1LIpLBJsF3WqD28n0NPgxq0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B766E3858D37 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756559516; x=1757164316; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=daCn1bKE0859gg6FSgmLj++g3q27GPZvZ6Kk8uocchg=; b=kH2KFJ6Vd5/rQseWZUG2dvBRbH3P9OnmNhh1nzZmvh+x9B8n2CcgRB72jH2vX/En1V QtZIao9fUBqFVveFBeukb68mHbUl5L0b8P60md0yE1cVtUjE7pd1E5jzpE93oY3e8HZj yhzeY/zzanK+w2vR6wC25DUbptUbkPRrP5eOxM4TArFfWA8FKvvsGbFa+tX/u6Yk/0Fj s+5MWlXJ5FBoEt70lSWBeFTZ8P+IAu2sOxG6LU0TjpocHlS3+UvdaipgPGhnGLI3gf9/ vUgPxX3vYLnKhRiWRvApafiTGSiHscykznxg8H4/1bG/dAmHnWq0rausDF/rnb4s/C0m MzEA== X-Gm-Message-State: AOJu0Yxpbpj3ldjJ2V1QSuL883UTgKJqU8UYRy0HH+uXsLrbxF2SkVXb lBgkEPWWwKOYfTF1sv4H3paXrd0VulTFyKNa/HfxWmc1TSeW2pvg6hgvNFggi9NwETNx2c8NLhs 8hf1bQeNdC7BDJJx8aCuopY7Cfc1ua+yWMsd01q0zgaoSqEJyWzCkiA== X-Gm-Gg: ASbGncuhHJByfQOpYKp3GF2LyvJpEKdzhjbLEWlA4x9yUqgDFCfcfQJG73oTukRBQ32 FXmXFY32yE/WEZ/otv+wjbZw/y8jfCbrnevVfOEq8HxhydSXvZpRzswbSorjnxoy5R/cbFeI63d 7EX15iK4LAMCqGhzJzHSLfh7zZv/bRX+0hzji6/keEKj3A0c60qYxXnkHGjCnBhJMMQ0g8l6Wzv FAj3dytLSf2qbqJvm2YtraVKSa7PjBGCujWd+t32dyZvSaGnO2dgEEYmClvRg== X-Google-Smtp-Source: AGHT+IGWuuhsSDxd74uw+PZE66MefcVPJGJLynsDF69LSYredz+v/YALX/9ndVRlIZDAaaVai3MUAMXyyjE9w0V+cLo= X-Received: by 2002:a05:6402:13d4:b0:61d:1f93:ba69 with SMTP id 4fb4d7f45d1cf-61d26ec90bfmr1614220a12.34.1756559515838; Sat, 30 Aug 2025 06:11:55 -0700 (PDT) MIME-Version: 1.0 References: <32903412-e185-4930-b538-916093747e02 AT SystematicSW DOT ab DOT ca> In-Reply-To: <32903412-e185-4930-b538-916093747e02@SystematicSW.ab.ca> Date: Sat, 30 Aug 2025 14:11:19 +0100 X-Gm-Features: Ac12FXyiIY8BviZ2BagZLWs8_9jlmex29eM59NZG_fnQiVgdLvtJJxwR8cSNuYw Message-ID: Subject: Re: git aliases in cygwin To: cygwin AT cygwin DOT com X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Adam Dinwoodie via Cygwin Reply-To: Adam Dinwoodie Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" On Fri, 29 Aug 2025 at 21:22, Brian Inglis via Cygwin wrote: > > On 2025-08-29 06:25, J via Cygwin wrote: > > Hello! > > I'm trying understand the proper way to acheive a git-decorated-prompt > > under cygwin. > > When using git-bash in Windows, it automatically sets the prompt to reflect > > the current repositor branch when cd'ing to a folder that contains a git > > sandbox. > > To obtain this effect under Ubuntu, it was necessary to set the PS1 > > (prompt) variable in ~/.bashrc to the following: > > export PS1='\[\033]0;$TITLEPREFIX:$PWD\007\]\n\[\033[32m\]\u@\h > > \[\033[35m\]$MSYSTEM \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n$ ' > > This appears to work by using the aliases that the git package installs. > > Since Ubuntu is general-purpose and not for a specific use like git-bash > > is, it does not automatically set the prompt for you. > > For Gentoo, setting the PS1 variable in ~/.bashrc did not work, because > > even after installing git, it did not install its aliases in the profiles. > > So for Gentoo, putting the following line in ~/.bashrc made the prompt > > variable acheive the desired effect: > > . /usr/share/git/git-prompt.sh > > Now on to Cygwin. > > Even though I've installed git, the git aliases don't seem to be present, > > or at least I can't figure out how to get them set. > > Thank you for reading, and thank you in advance > > Looks like the Cygwin git package provides only bash completions, not available > zsh and tcsh completions under contrib/completion/, nor the optional > git-prompt.sh, or other scripts available under contrib/. > > You can curl -JLORSsZ or wget/2 -N from > > > Other projects provide shell and git aliases and completions for better > integration. Correct. This shouldn't be difficult to add to the Git packaging for Cygwin, but with my (somewhat dusty) Git maintainer hat on, I've historically been reluctant to include things from contrib unless I was very confident they wouldn't cause problems. In particular, as someone who has had git-prompt.sh manually included in his standard dotfile configuration, I'm aware it can be _painfully_ slow in moderate-to-large repositories on Cygwin thanks to the additional overheads of the Cygwin compatibility layers between the Git C code and the Windows filesystem. git-bash has similar issues, but somewhat less pronounced thanks to the compatibility layers being thinner. None of this means there's no way to package these scripts, or that they shouldn't be distributed in such a way that (as is apparently the case with Gentoo) a user can opt in to having them included. But, as ever, someone has to make and document that change, and when I haven't been able to keep up with Git releases for over a year, I'm definitely not the person with the bandwidth to do it. -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple