unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Tobias Geerinckx-Rice <me@tobias.gr>
To: Christophe Pisteur <christophe.pisteur@fsfe.org>
Cc: help-guix@gnu.org
Subject: Re: define  PATH and PROFILE
Date: Sun, 03 Jan 2021 21:49:36 +0100	[thread overview]
Message-ID: <87y2h9hhjz.fsf@nckx> (raw)
In-Reply-To: <da1c44dd548f4cc18e749dbb6f0331faaa83eba0.camel@fsfe.org>

[-- Attachment #1: Type: text/plain, Size: 2284 bytes --]

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:$INFOPATH"

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

  reply	other threads:[~2021-01-03 20:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-03 18:59 define PATH and PROFILE Christophe Pisteur
2021-01-03 20:49 ` Tobias Geerinckx-Rice [this message]
2021-01-03 22:01   ` Christophe Pisteur
     [not found] <mailman.103.1609779610.25319.help-guix@gnu.org>
2021-01-04 17:07 ` Zelphir Kaltstahl
2021-01-04 17:56   ` Tobias Geerinckx-Rice
2021-01-04 21:19     ` Zelphir Kaltstahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2h9hhjz.fsf@nckx \
    --to=me@tobias.gr \
    --cc=christophe.pisteur@fsfe.org \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).