delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/08/29/16:21:45

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 57TKLioU1613204
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 57TKLioU1613204
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=c2GsJnWk
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E3253839E26
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1756498901;
bh=2mXL99761KyEOmZmM55lYSXGn9Sf9FruwA5jFIr5lrU=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=c2GsJnWkohjQZqdxIl0RV3p4hbIRUbfbVuRfJKP/6dFAz8P7ltX1/ys+ZKcN8kA/G
QV9KK3+fbM3rt2LUZdkkNk6S+9V5V0ZrokYlV+fS4W9w7Wd+889eJIKUdOG7dCJRHy
3KZ5nojZY5luEzGIN36bSfFrLfSQpMWbLHTCNpJE=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 479CD3858410
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 479CD3858410
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1756498874; cv=none;
b=oxhrUdQRJsJISwFKAUMp4AwyNW/xs42vkFe0SYc09trAaDRIViYQhdrenvWxPyF45UTEC+h2l94IJIiAw2swuAbgoVxtAf2U//poFCwJbPo+K4BcYyfh31UqtPA7MTuELKsKNlqtq1C9l3P2g2FP7pQH08E5YjPq1bEvlez156w=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1756498874; c=relaxed/simple;
bh=LMqwgFGqU+bFTreUFmv/CIYl3KHc0Mq9IrSwNVCDCWo=;
h=Message-ID:Date:MIME-Version:From:Subject:To:DKIM-Signature;
b=bFJSfkDDYAvNDnZ4H8QdNRvtCwPHLWq9SeShByakFr/KW56FtnvmTZZZo70zZs2QuzCtHq0qq8/vDypGO4Q3ink3OGAUYJuvOcEvJI5Hr8P01kjjWcvjoFZNU/sio7i513yoWx4q9jumlFNVne39/KYB638Dl0T4fNfsGAORIgw=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 479CD3858410
Message-ID: <32903412-e185-4930-b538-916093747e02@SystematicSW.ab.ca>
Date: Fri, 29 Aug 2025 14:21:11 -0600
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: git aliases in cygwin
To: cygwin AT cygwin DOT com
References: <CAM9TqJ5_cBv6KxSVKCiAK_AxhXw8RQb50CrE-g1o0=rvRHemnA AT mail DOT gmail DOT com>
Organization: Systematic Software
In-Reply-To: <CAM9TqJ5_cBv6KxSVKCiAK_AxhXw8RQb50CrE-g1o0=rvRHemnA@mail.gmail.com>
X-Stat-Signature: ykfuaeu33gdszxiz1qjszx5od349qd61
X-Rspamd-Server: rspamout03
X-Rspamd-Queue-Id: 202EE20026
X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361
X-Session-ID: U2FsdGVkX1/S4NJTajSZGdsG6M6YCIa6y0YcLXJcNX8=
X-HE-Tag: 1756498872-700144
X-HE-Meta: U2FsdGVkX1+NLedG+BJH+HXvXy5yYuYvOxDsDY1S83bxgODHEeVhf9GnjbHWoxWXx6A6zeSECz+JKh9zadeg03SqjPVRbb248gxAb2PqZWuCsJK6LnKKCkE9aHvZBpmjlqfug6Ykpr2QjZga2NCr2YZiiUBBN4xwsOnfpzjR2yCwPbqJskoOcStpKy/B4o6cL/M3uDPivno7OE9JqjAD1zwulDzWzOgthZG16myxue1mfRkkOCyXd52qAV6G7/XpC1UrpEuYqSZIXn8cBCc7yAR2FJ8s0qyh95hOReP2fhZCs7aDlFyR+5k0unzQgZcOciDIOtaCZjhj8xsbmjEZQt8T+xzEAiUUT7fo4Rsv6vNSLoNyDTdK9I93w8YIw8glMtU8J2LA9WGSzPA5PklLJw==
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Brian Inglis via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Brian Inglis <Brian DOT Inglis AT SystematicSW DOT ab DOT ca>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 57TKLioU1613204

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
<https://raw.githubusercontent.com/git/git/refs/heads/master/contrib/completion/git-prompt.sh>

Other projects provide shell and git aliases and completions for better 
integration.

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher  but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019