fedelibre / LilyDevDebian

Custom Debian GNU/Linux for LilyPond developers
3 stars 1 forks source link

Prompt (& title bar) lack Git branch #7

Closed MarkDBlackwell closed 9 years ago

MarkDBlackwell commented 9 years ago

The changes I made include the Git branch [in the] prompt, as [promised] in the LilyPond Contributor Guide. I would stick with what the LilyPond manual [promises]. Please test any change on the current LilyDev [repository], which runs Debian Jessie and does have bash_completion.

export PS1="\h:\w\$(__git_ps1)$ "

On Debian stretch, using your current LilyDev repository, I built an ISO and installed it successfully. After doing cd ~/lilypond-git (there), the Git branch appears neither in the prompt nor in LXTerminal's title bar.

I notice the current LilyDev repository (commit 3e780d138e2c3c30aa945fa112e90daae47f8db5) lacks \$(__git_ps1) in lines one, two and three of skel/.bashrc and the resulting ~/.bashrc. BTW, inside double quotes (ref. line one) this syntax will succeed.

However, inside single quotes (ref. lines two and three), the syntax that will be successful is $(__git_ps1): excluding the backslash \.

BTW, the current CG (version 2.19.24) otherwise mentions PS1 only here:

### my-bashrc
export PS1="\[\e[1;33mGUB-ENV \w\]$ \[\e[0m\]"
export PATH=$PATH
export TERM=xterm

These presumably are general instructions for machines beyond the LilyDev ISO. @gperciva, is my-bashrc a file in your GUB repository, or generated by it? If so, I couldn't find it.

Section Building GUB of CG's 11.5 Notes on builds with GUB says "GUB – the Grand Unified Builder – is used to build the release versions of LilyPond. The simplest way to set up a GUB build environment is to use a virtual machine with LilyDev." Section What is GUB of the GUB – Grand Unified Builder website homepage explains GUB is "for turnkey building of all LilyPond [and certain other] binary installers."

See also #4.

gperciva commented 9 years ago

my-bashrc is the three (or four) lines you quoted above. My habit at that time, when writing documentation, was to begin a file with the filename (commented out).

It took me a while to remember what was happening, but here it is:

Some of the above story won't be relevant to people, but the general idea of avoiding unnecessary recomputation by keeping with a known environment is still valid. (of course, it would help if somebody added this to the CG for future reference)

fedelibre commented 9 years ago

Il giorno ven 7 ago 2015 alle 23:03, Mark D. Blackwell notifications@github.com ha scritto:

On Debian stretch, using your current LilyDev repository, I built an ISO and installed it successfully. After doing cd ~/lilypond-git (there), the Git branch appears neither in the prompt nor in LXTerminal's title bar.

Because I haven't added the PS1 variable yet. Before leaving for holidays I was trying to find a way to append our variables to the default bashrc, as we were discussing on pull #4. I'm stuck here: https://lists.debian.org/debian-live/2015/08/msg00020.html

If preseed does not work I'll use the lilydev-setup.sh script instead. I'll be back in September.