fish_functions: record the location of virtualenvs
- ID
818f540- date
2026-04-10 08:10:18+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
6f10667- message
fish_functions: record the location of virtualenvs- changed files
1 file, 7 additions
Changed files
fish_functions/venv.fish (2093) → fish_functions/venv.fish (2410)
diff --git a/fish_functions/venv.fish b/fish_functions/venv.fish
index 0137cbf..d970d66 100644
--- a/fish_functions/venv.fish
+++ b/fish_functions/venv.fish
@@ -54,4 +54,11 @@ function venv --description "Create and activate a new virtual environment"
if string match -q "$HOME/*" "$PWD"
tmutil addexclusion .venv
end
+
+ # Record the path to this venv in ~/.venv_registry.
+ #
+ # This is a text file with one directory per line, which records
+ # the location of all virtualenvs I've created. It allows me
+ # to scan all my virtualenvs later if necessary.
+ append_to_file_if_not_exists ~/.venv_registry "$PWD/.venv"
end