[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ‘Know which branch we’re on’ on Ubuntu 16

From: Federico Bruni
Subject: Re: ‘Know which branch we’re on’ on Ubuntu 16
Date: Sun, 04 Jun 2017 18:41:28 +0200

Il giorno dom 4 giu 2017 alle 17:58, Simon Albrecht <address@hidden> ha scritto:

finally I’ve managed to get Ubuntu 16.04 working, and copied all of my previous home directory including .bashrc. However, the ‘export PS1’ trick suggested in <> with the following line in .bashrc:

export PS1="address@hidden \w\$(__git_ps1)$ "

doesn’t seem to work the same anymore: upon any command I execute in the terminal I get an error message ‘__git_ps1: command not found’. Can anyone give me a hint how to update this?

Did you source (where __git_ps1 is defined)?
In Fedora I have:

source /usr/share/git-core/contrib/completion/
export PS1='[\W$(declare -F __git_ps1 &>/dev/null && __git_ps1 " (%s)")]\$ '

This is for Fedora, but the rationale should be the same on Ubuntu:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]