Clarify this comment a bit
- ID
f0d5074- date
2023-12-26 00:02:10+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
ab36f62- message
Clarify this comment a bit- changed files
1 file, 11 additions, 5 deletions
Changed files
config.fish (5032) → config.fish (5265)
diff --git a/config.fish b/config.fish
index bbe2053..0349981 100644
--- a/config.fish
+++ b/config.fish
@@ -20,12 +20,18 @@ set -x fish_function_path ~/repos/scripts/fish_functions $fish_function_path
# Prepend any extra directories to my PATH variable.
#
-# Note: I use this instead of `fish_add_path` because it updates a global
-# `fish_user_paths` array in ~/.config/fish/fish_variables, but that makes
-# it harder to see how/where my PATH is defined.
+# == Why not use `fish_add_path`? ==
#
-# Doing it this way means I get a fresh PATH in every shell, and it's
-# only updated by the directives below.
+# That function updates a global `fish_user_paths` array in a file which
+# isn't tracked by Git: `~/.config/fish/fish_variables`. That makes it
+# harder to see how/where my PATH is defined.
+#
+# For example, I could have removed the code that adds a directory to
+# my PATH from this repo, but it would persist in the `fish_variables` file.
+#
+# Using my own function means I get a fresh PATH in every shell, and it's
+# only updated by the directives below. All my PATH additions can be
+# tracked in Git.
function prepend_to_path
if test (count $argv) -eq 0