exercism / exercism/website-copy
CLI walkthrough Adding ~/bin to $PATH in Bash
- Dominant language
- HTML
- Stars
- 217
- Forks
- 944
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
The instruction page (https://exercism.org/cli-walkthrough) shows:
**echo 'export PATH=~/bin:$PATH' >> ~/.bash_profile
source ~/.bash_profile**
But the next time you start a shell (not the login-shell) the PATH variable will not reflect the change as _.bash_profile_ will only be invoked during the start of the **login-**shell. I solved this issue to put the required PATH-statement into _.bashrc_
Taken from the man:
_When bash is invoked as an interactive login shell, or as a non-inter‐
active shell with the --login option, it first reads and executes com‐
mands from the file /etc/profile, if that file exists. After reading
that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
in that order, and reads and executes commands from the first one that
exists and is readable. The --noprofile option may be used when the
shell is started to inhibit this behavior._
_When an interactive shell that is not a login shell is started, bash
reads and executes commands from ~/.bashrc, if that file exists. This
may be inhibited by using the --norc option. The --rcfile file option
will force bash to read and execute commands from file instead of
~/.bashrc._
PS: I am running Arch linux.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.