From a6560a4ea89a69e092097af6c9316a693b33f6d4 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Tue, 4 Apr 2023 17:52:12 +0200 Subject: [PATCH] docs/fish_add_path: Also clarify the examples --- doc_src/cmds/fish_add_path.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/doc_src/cmds/fish_add_path.rst b/doc_src/cmds/fish_add_path.rst index e9d342d11..0f3a70cb3 100644 --- a/doc_src/cmds/fish_add_path.rst +++ b/doc_src/cmds/fish_add_path.rst @@ -70,18 +70,26 @@ Example :: # I just installed mycoolthing and need to add it to the path to use it. + # It is at /opt/mycoolthing/bin/mycoolthing, + # so let's add the directory: /opt/mycoolthing/bin. > fish_add_path /opt/mycoolthing/bin - # I want my ~/.local/bin to be checked first. + # I want my ~/.local/bin to be checked first, + # even if it was already added. > fish_add_path -m ~/.local/bin # I prefer using a global fish_user_paths + # This isn't saved automatically, I need to add this to config.fish + # if I want it to stay. > fish_add_path -g ~/.local/bin ~/.otherbin /usr/local/sbin # I want to append to the entire $PATH because this directory contains fallbacks - > fish_add_path -aP /opt/fallback/bin + # This needs --path/-P because otherwise it appends to $fish_user_paths, + # which is added to the front of $PATH. + > fish_add_path --append --path /opt/fallback/bin # I want to add the bin/ directory of my current $PWD (say /home/nemo/) + # -v/--verbose shows what fish_add_path did. > fish_add_path -v bin/ set fish_user_paths /home/nemo/bin /usr/bin /home/nemo/.local/bin