Open roberth opened 3 years ago
Describe the bug
Unlike nix-shell, lorri resets XDG_DATA_DIRS by default, causing user and system commands to fail to autocomplete.
XDG_DATA_DIRS
To Reproduce Steps to reproduce the behavior:
eval "$(lorri direnv)"
Expected behavior
Lorri preserves the host's XDG_DATA_DIRS by default, like nix-shell does.
Workaround
.envrc
HOST_XDG_DATA_DIRS="${XDG_DATA_DIRS:-}" eval "$(lorri direnv)" export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${HOST_XDG_DATA_DIRS}"
Perhaps this logic can be built into lorri itself, although it'd be better to figure out why it's cleared in the first place.
Metadata
$ lorri info lorri version: 1 Lorri Project Configuration expression: /home/user/h/hercules-ci-agent/shell.nix
$ uname -a Linux feb 5.9.16 #1-NixOS SMP Mon Dec 21 12:28:21 UTC 2020 x86_64 GNU/Linux
Additional context
stdenv extends XDG_DATA_DIRS as part of its setup.sh script.
stdenv
setup.sh
I'm hitting this as well - workaround works, but would be nice to be built in.
Describe the bug
Unlike nix-shell, lorri resets
XDG_DATA_DIRS
by default, causing user and system commands to fail to autocomplete.To Reproduce Steps to reproduce the behavior:
eval "$(lorri direnv)"
Expected behavior
Lorri preserves the host's
XDG_DATA_DIRS
by default, like nix-shell does.Workaround
.envrc
Perhaps this logic can be built into lorri itself, although it'd be better to figure out why it's cleared in the first place.
Metadata
Additional context
stdenv
extendsXDG_DATA_DIRS
as part of itssetup.sh
script.