From 54b7d1290a9a258bc31e41d59289106a260a1036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 11 May 2025 22:43:35 +0200 Subject: [PATCH] fish: fish_remove_path function --- .../common/fish/functions/fish_remove_path.fish | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 nix/homeModules/common/fish/functions/fish_remove_path.fish diff --git a/nix/homeModules/common/fish/functions/fish_remove_path.fish b/nix/homeModules/common/fish/functions/fish_remove_path.fish new file mode 100644 index 00000000..b30007fa --- /dev/null +++ b/nix/homeModules/common/fish/functions/fish_remove_path.fish @@ -0,0 +1,8 @@ +# source: https://github.com/fish-shell/fish-shell/issues/8604 + +function fish_remove_path + if set -l index (contains -i "$argv" $fish_user_paths) + set -e fish_user_paths[$index] + echo "Removed $argv from the path" + end +end