]> git.sev.monster Git - dotfiles.git/commitdiff
zshenv: fix perl dir if xdg data unset
authorsev <git@sev.monster>
Mon, 16 Sep 2024 13:44:15 +0000 (08:44 -0500)
committersev <git@sev.monster>
Mon, 16 Sep 2024 13:46:40 +0000 (08:46 -0500)
etc/zsh/.zshenv

index 6a513e251c7976a4541e5ecae99b6c507d01f9fa..8bf4cbe3b70da29f5fd8f0b84b00b8e1a7981894 100644 (file)
@@ -288,9 +288,9 @@ if [[ ! -v GNUPGHOME ]] {
 
 ## perl local lib
 [[ ! -v PERL_LOCAL_LIB_ROOT && -v commands[perl] &&
-   -d $XDG_DATA_HOME/perl5/lib/perl5 ]] &&
-  eval $(perl -I$XDG_DATA_HOME/perl5/lib/perl5 \
-              -Mlocal::lib=$XDG_DATA_HOME/perl5 2>/dev/null)
+   -d ${XDG_DATA_HOME:-~/.local/share}/perl5/lib/perl5 ]] &&
+  eval $(perl -I${XDG_DATA_HOME:-~/.local/share}/perl5/lib/perl5 \
+              -Mlocal::lib=${XDG_DATA_HOME:-~/.local/share}/perl5 2>/dev/null)
 
 ## go
 if [[ -v commands[go] ]] {
This page took 0.046359 seconds and 4 git commands to generate.