Theme directory from environment

This commit is contained in:
Emmanuel BENOîT 2022-10-22 10:01:34 +02:00
parent e32b7f57c2
commit c2df8fc769

View file

@ -291,6 +291,9 @@ sub load_theme
( map { $ENV{HOME} . '/' . $_ } @{$CONFIG{cfg_user_themes}} ) , ( map { $ENV{HOME} . '/' . $_ } @{$CONFIG{cfg_user_themes}} ) ,
@{$CONFIG{cfg_sys_themes}} @{$CONFIG{cfg_sys_themes}}
); );
if ($CONFIG{cfg_from_env} && exists $ENV{GPROMPT_THEME_DIR}) {
unshift @tdirs, $ENV{GPROMPT_THEME_DIR};
}
foreach my $dir ( @tdirs ) { foreach my $dir ( @tdirs ) {
my $path = "$dir/${theme}.pm"; my $path = "$dir/${theme}.pm";
next unless -f $path; next unless -f $path;