Skip to content

Documentation: note that shell needs to be restarted after editing ~/.bashrc#204

Open
jernst wants to merge 1 commit into
Moddable-OpenSource:publicfrom
jernst:public
Open

Documentation: note that shell needs to be restarted after editing ~/.bashrc#204
jernst wants to merge 1 commit into
Moddable-OpenSource:publicfrom
jernst:public

Conversation

@jernst

@jernst jernst commented May 28, 2019

Copy link
Copy Markdown

No description provided.

@jim80

jim80 commented May 29, 2019

Copy link
Copy Markdown

or maybe "source ~/.bashrc" ?

https://stackoverflow.com/questions/2518127/how-do-i-reload-bashrc-without-logging-out-and-back-in.

But which ever way, it's not a bad point in a getting started guide - even after 30 years I'll still occasionally forget to restart/refresh the shell by some means when I need to!

@Alhadis

Alhadis commented May 9, 2020

Copy link
Copy Markdown

Restarting the shell shouldn't be necessary if you're using export PATH after modifying it:

λ type foo
-bash: type: foo: not found
λ mkdir -p /tmp/path/to/executable
λ printf 'echo "It works."\n' > $_/foo
λ chmod +x /tmp/path/to/executable/foo
λ export PATH=/tmp/path/to/executable:$PATH
λ type foo
foo is /tmp/path/to/executable/foo
λ foo
It works.

It's different if you export the PATH after a program that needs it has finished running, but that's a given.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants