mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-03-27 18:25:12 +08:00
Rename RESET_PATH to ORIGINAL_PATH
This variable records the value of $PATH environment variable before oh-my-fish is sourced. When we "reload" the framework, we reset $PATH with this recorded value so that we boot from a clean state.
This commit is contained in:
parent
8aa6bf7ee2
commit
2ac89b5a1c
@ -13,16 +13,17 @@
|
|||||||
#
|
#
|
||||||
# ENV
|
# ENV
|
||||||
# OSTYPE Operating system.
|
# OSTYPE Operating system.
|
||||||
# RESET_PATH Original $PATH preseved across Oh My Fish reloads.
|
# ORIGINAL_PATH Original $PATH preseved across Oh My Fish reloads.
|
||||||
# OMF_PATH ~/.local/share/omf by default.
|
# OMF_PATH ~/.local/share/omf by default.
|
||||||
# OMF_IGNORE List of packages to ignore.
|
# OMF_IGNORE List of packages to ignore.
|
||||||
# OMF_CONFIG ~/.config/omf by default.
|
# OMF_CONFIG ~/.config/omf by default.
|
||||||
# OMF_VERSION Oh My Fish! version
|
# OMF_VERSION Oh My Fish! version
|
||||||
|
|
||||||
if set -q RESET_PATH
|
# Save PATH before oh my fish for reseting the PATH when we reload OMF.
|
||||||
set PATH $RESET_PATH
|
if set -q ORIGINAL_PATH
|
||||||
|
set PATH $ORIGINAL_PATH
|
||||||
else
|
else
|
||||||
set -gx RESET_PATH $PATH
|
set -gx ORIGINAL_PATH $PATH
|
||||||
end
|
end
|
||||||
|
|
||||||
set -q OSTYPE; or set -g OSTYPE (uname)
|
set -q OSTYPE; or set -g OSTYPE (uname)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user