hyprwm/Hyprland

Nested/recursive variable expansion broke somewhere after v0.35.0

Closed this issue · 16 comments

I skipped from v0.35.0 to v0.35.1, so I'm not sure which version this broke in, but it's a regression of some sort.

I have a config that nested variable expansion, like so (in this order):

$TERMINAL = alacritty
$comms = [workspace special:hyprake] $TERMINAL --class hyprake
workspace = special:hyprake, on-created-empty:$comms

This stopped working when I upgraded from v0.35.0, so sometime after that. Replacing $TERMINAL in the $comms = definition with it's expanded value alacritty works fine.

kojq commented

Replacing $TERMINAL in the $comms = definition with it's expanded value alacritty works fine.

This does not seem relevant.

So, I took your config and tried. It works. What I can assume is happening is if you close alacritty and perform your insert bind quickly (before it fully closes), your bind will not open a new alacritty within the special workspace.

kojq commented

I tried to replicate again. Now, using something other than $TERMINAL like $CONSOLE or TERM is fine.

I don't think hyprlang allows overwriting env vars, and $TERMINAL looks like one.

kojq commented

$TERM is one, but works.

kojq commented

overwrote my foot to be alacritty

there aint no way to dump env from hyprlang but make sure it's in hyprland env, you can exec-once = env > ~/file I guess

kojq commented

I know what is happening

kojq commented

globbing and splitting

kojq commented

$TERM becomes the term name

kojq commented

so it becomes alacrittyinal

kojq commented

which is not alacritty, so nothing opens

kojq commented

qed

kojq commented

sry for spam, anw, case closed

that's a hyprlang bug then

kojq commented

cool, ig reference this issue there in new one

bug been fixed