Re: guix environment & PS1

2015-07-01 Thread 韋嘉誠
On Jul 1, 2015 4:02 PM, "Thompson, David" wrote: > On Wed, Jul 1, 2015 at 9:10 AM, Ludovic Courtès wrote: > > I reckon it has the unfortunate property of not working out of the box > > (except on GuixSD.) I’m sure many tools these days would choose to > > hard-code a fancy colored PS1; while I

Re: guix environment & PS1

2015-07-01 Thread Thompson, David
On Wed, Jul 1, 2015 at 9:10 AM, Ludovic Courtès wrote: > "Thompson, David" skribis: > >> On Thu, Jun 25, 2015 at 7:45 AM, Ludovic Courtès wrote: >>> Cyril Roelandt skribis: >>> +(define (run-shell shell env-name) + "Run the given SHELL, adding '(ENV-NAME) ' at the start of the prompt

Re: guix environment & PS1

2015-07-01 Thread Ludovic Courtès
"Thompson, David" skribis: > On Thu, Jun 25, 2015 at 7:45 AM, Ludovic Courtès wrote: >> Cyril Roelandt skribis: >> >>> +(define (run-shell shell env-name) >>> + "Run the given SHELL, adding '(ENV-NAME) ' at the start of the prompt." >>> + (cond ((string=? shell "/bin/bash") >>> + (let

Re: guix environment & PS1

2015-06-29 Thread 韋嘉誠
On Mon, Jun 29, 2015 at 10:41 AM, Ludovic Courtès wrote: > "Claes Wallin (韋嘉誠)" skribis: >> On Thu, Jun 25, 2015 at 3:28 PM, Ricardo Wurmus >> wrote: >>> I’m mostly using “guix environment” with a single package name, and for >>> that purpose it would be nice if I could make the shell prompt i

Re: guix environment & PS1

2015-06-29 Thread Ludovic Courtès
"Claes Wallin (韋嘉誠)" skribis: > On Thu, Jun 25, 2015 at 3:28 PM, Ricardo Wurmus > wrote: >> Thompson, David writes: >>> On Thu, Jun 25, 2015 at 8:02 AM, Ricardo Wurmus >>> wrote: Would it be feasible to give "GUIX_ENVIRONMENT" the package name as a value instead of just "t"? >>>

Re: guix environment & PS1

2015-06-25 Thread 韋嘉誠
On Thu, Jun 25, 2015 at 10:00 PM, Claes Wallin (韋嘉誠) wrote: > On Thu, Jun 25, 2015 at 3:28 PM, Ricardo Wurmus > wrote: >> Thompson, David writes: >>> On Thu, Jun 25, 2015 at 8:02 AM, Ricardo Wurmus >>> wrote: Would it be feasible to give "GUIX_ENVIRONMENT" the package name as a v

Re: guix environment & PS1

2015-06-25 Thread 韋嘉誠
On Thu, Jun 25, 2015 at 3:28 PM, Ricardo Wurmus wrote: > Thompson, David writes: >> On Thu, Jun 25, 2015 at 8:02 AM, Ricardo Wurmus >> wrote: >>> >>> Would it be feasible to give "GUIX_ENVIRONMENT" the package name as a >>> value instead of just "t"? >> >> Not really, because 'guix environment'

Re: guix environment & PS1

2015-06-25 Thread Ricardo Wurmus
Thompson, David writes: > On Thu, Jun 25, 2015 at 8:02 AM, Ricardo Wurmus > wrote: >> >> Would it be feasible to give "GUIX_ENVIRONMENT" the package name as a >> value instead of just "t"? > > Not really, because 'guix environment' accepts any number of packages. Oh, right. I forgot about ad-

Re: guix environment & PS1

2015-06-25 Thread Thompson, David
On Thu, Jun 25, 2015 at 8:02 AM, Ricardo Wurmus wrote: > > Would it be feasible to give "GUIX_ENVIRONMENT" the package name as a > value instead of just "t"? Not really, because 'guix environment' accepts any number of packages. Up until now I have been using the $SHLVL environment variable to g

Re: guix environment & PS1

2015-06-25 Thread Thompson, David
On Thu, Jun 25, 2015 at 7:45 AM, Ludovic Courtès wrote: > Cyril Roelandt skribis: > >> +(define (run-shell shell env-name) >> + "Run the given SHELL, adding '(ENV-NAME) ' at the start of the prompt." >> + (cond ((string=? shell "/bin/bash") >> + (let* ((directory (or (getenv "TMPDIR") "

Re: guix environment & PS1

2015-06-25 Thread Ricardo Wurmus
Ludovic Courtès writes: > Cyril Roelandt skribis: > >> +(define (run-shell shell env-name) >> + "Run the given SHELL, adding '(ENV-NAME) ' at the start of the prompt." >> + (cond ((string=? shell "/bin/bash") >> + (let* ((directory (or (getenv "TMPDIR") "/tmp")) >> +(t

guix environment & PS1

2015-06-25 Thread Ludovic Courtès
Cyril Roelandt skribis: > +(define (run-shell shell env-name) > + "Run the given SHELL, adding '(ENV-NAME) ' at the start of the prompt." > + (cond ((string=? shell "/bin/bash") > + (let* ((directory (or (getenv "TMPDIR") "/tmp")) > +(template (string-append directory "