This repository was archived by the owner on Oct 15, 2022. It is now read-only.
Description 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:
use nixpkgs master
use direnv with eval "$(lorri direnv)"
observe that commands from the system or user profile do not support bash completion anymore
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.
Reactions are currently unavailable
Describe the bug
Unlike nix-shell, lorri resets
XDG_DATA_DIRSby 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_DIRSby default, like nix-shell does.Workaround
.envrcPerhaps 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
stdenvextendsXDG_DATA_DIRSas part of itssetup.shscript.