help-guix
[Top][All Lists]
Advanced

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

Re: define PATH and PROFILE


From: Christophe Pisteur
Subject: Re: define PATH and PROFILE
Date: Sun, 03 Jan 2021 23:01:44 +0100
User-agent: Evolution 3.38.2-1

Le dimanche 03 janvier 2021 à 21:49 +0100, Tobias Geerinckx-Rice a
écrit :
> Hi Christophe,
> 
> Christophe Pisteur 写道:
> > 1) after guix pull, I get the following message:
> > 
> > export PATH="$HOME/.config/guix/current/bin:$PATH"
> > export 
> > INFOPATH="$HOME/.config/guix/current/share/info:$INFOPATH"
> > 
> > I don't quite understand what to type in the terminal.
> 
> Exactly these two lines as printed.  As you copied them into this 
> e-mail.
> 
> > Should I replace
> > $HOME or HOME with the path of my directory, for example: 
> > 
> > export PATH="/home/christophe/.config/guix/current/bin:$PATH"
> > and then:
> > export
> > INFOPATH="/home/christophe/.config/guix/current/share/info:$INFOPAT
> > H"
> 
> Well, if you:
> 
>   $ echo $HOME
>   /home/christophe
> 
> so both are entirely equivalent.
> 
> If you write (or copy/paste) $HOME, the shell will perform your 
> replacement for you, with less chance of mistakes.
> 
> > 2) similar question with this message:
> > 
> > GUIX_PROFILE="/home/christophe/.guix-profile" 
> > . "$GUIX_PROFILE/etc/profile"
> > 
> > Is this two actions (two step in the terminal, the first line 
> > and
> > "enter" then the second line and "enter")?
> 
> Yes, although most terminal emulators do the right thing if you 
> simply copy and paste both lines at once with the mouse.  You 
> might have to hit Enter after that; it depends on the emulator.
> 
> > And does the second line really begin with a dot?
> 
> Yes.  ‘.’ evaluates the contents of a shell script as if you typed 
> it at the prompt.  In bash, it's aliased to ‘source’ but this is 
> not standard, so we say ‘.’.
> 
> It's similar to executing the script (without the dot), but allows 
> the script to change the current shell's environment:
> 
>   $ TEST=nope
>   $ cat ./example
>   TEST=hullo
>   $ echo $TEST
>   nope
>   $ chmod +x ./example
>   $ ./example # <- running
>   $ echo $TEST
>   nope
>   $ . ./example
>   $ echo $TEST # <- sourcing
>   hullo
>   $
> 
> > In both questions (1 et 2), I have tried several options but the
> > terminal does not return any message (neither error nor success
> > message)
> 
> In Unix -- and GNU, being a Unix -- silence is golden.  }:-)
> 
> If something did go wrong you should've got an error message, so 
> it sounds like everything is fine & boring.
> 
> Welcome to Guix, and please don't hesitate to ask questions, 
> newbie or not.
> 
> Kind regards,
> 
> T G-R


Thank you very much for this answer which not only explains to me what
to do, but also allows me to understand what I am doing! 
Thank you!
Christophe


reply via email to

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