diff options
Diffstat (limited to 'xmake/scripts')
| -rw-r--r-- | xmake/scripts/profile-unix.fish | 4 | ||||
| -rw-r--r-- | xmake/scripts/profile-unix.sh | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/xmake/scripts/profile-unix.fish b/xmake/scripts/profile-unix.fish index ea0f243de..4811a5f12 100644 --- a/xmake/scripts/profile-unix.fish +++ b/xmake/scripts/profile-unix.fish @@ -18,6 +18,10 @@ # @homepage profile-unix.fish # +# register PATH +string match --regex --quiet "(^|:)$XMAKE_ROOTDIR(:|\$)" "$PATH" && \ + export PATH="$XMAKE_ROOTDIR:$PATH" + # register environments export XMAKE_SHELL=fish diff --git a/xmake/scripts/profile-unix.sh b/xmake/scripts/profile-unix.sh index 1695b2331..93dd7157c 100644 --- a/xmake/scripts/profile-unix.sh +++ b/xmake/scripts/profile-unix.sh @@ -18,6 +18,9 @@ # @homepage profile-unix.sh # +# register PATH +[[ "$PATH" =~ (^|:)"$XMAKE_ROOTDIR"(:|$) ]] && export PATH="$XMAKE_ROOTDIR:$PATH" + # register completions if [[ -n "$ZSH_VERSION" ]]; then export XMAKE_SHELL=zsh |
