From ba4a2d2119ed5360bf5c63435975f8533564f3f8 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Thu, 5 Dec 2024 19:40:38 +0530 Subject: [PATCH] fish: conf.d/setup: Set environment variable for Poetry If and when we get to using Poetry, make sure it creates and uses the virtual environment inside the project root. https://python-poetry.org/docs/configuration/#virtualenvsin-project --- fish/.config/fish/conf.d/setup.fish | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fish/.config/fish/conf.d/setup.fish b/fish/.config/fish/conf.d/setup.fish index 2d26c00..08b3ea3 100644 --- a/fish/.config/fish/conf.d/setup.fish +++ b/fish/.config/fish/conf.d/setup.fish @@ -51,6 +51,9 @@ function __fish_setup_on_tty_login --description "Set up environment on tty logi # Ripgrep requires this environment variable for knowing the config file path set -gx RIPGREP_CONFIG_PATH {$HOME}/.config/ripgrep/ripgreprc + # Make Poetry create virtualenv inside the project root + set -gx POETRY_VIRTUALENVS_IN_PROJECT true + # Required for all environment variables to be set correctly, especially # in tmux session service. dbus-update-activation-environment --systemd --all