Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5fa5b7f

Browse filesBrowse files
gh-91629 Use conf.d configs and fish_add_path to set the PATH when installing for the Fish shell. (GH-91630)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
1 parent df98733 commit 5fa5b7f
Copy full SHA for 5fa5b7f

File tree

Expand file treeCollapse file tree

2 files changed

+8
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-6
lines changed

‎Mac/BuildScript/scripts/postflight.patch-profile

Copy file name to clipboardExpand all lines: Mac/BuildScript/scripts/postflight.patch-profile
+7-6Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,17 @@ bash)
7777
fi
7878
;;
7979
fish)
80-
CONFIG_DIR="${HOME}/.config/fish"
81-
RC="${CONFIG_DIR}/config.fish"
80+
CONFIG_DIR="${HOME}/.config/fish/conf.d/"
81+
RC="${CONFIG_DIR}/python-${PYVER}.fish"
8282
mkdir -p "$CONFIG_DIR"
8383
if [ -f "${RC}" ]; then
8484
cp -fp "${RC}" "${RC}.pysave"
8585
fi
86-
echo "" >> "${RC}"
87-
echo "# Setting PATH for Python ${PYVER}" >> "${RC}"
88-
echo "# The original version is saved in ${RC}.pysave" >> "${RC}"
89-
echo "set -x PATH \"${PYTHON_ROOT}/bin\" \"\$PATH\"" >> "${RC}"
86+
echo "# Setting PATH for Python ${PYVER}" > "${RC}"
87+
if [ -f "${RC}.pysave" ]; then
88+
echo "# The original version is saved in ${RC}.pysave" >> "${RC}"
89+
fi
90+
echo "fish_add_path -g \"${PYTHON_ROOT}/bin\"" >> "${RC}"
9091
if [ `id -ur` = 0 ]; then
9192
chown "${USER}" "${RC}"
9293
fi
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use :file:`~/.config/fish/conf.d` configs and :program:`fish_add_path` to set :envvar:`PATH` when installing for the Fish shell.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.