wezterm: better implemenation of set_by_os to avoid checking for os multiple times
This commit is contained in:
parent
78342c07ad
commit
3168e01c95
2 changed files with 6 additions and 4 deletions
|
@ -5,11 +5,12 @@ local function get_os()
|
|||
end
|
||||
|
||||
local function set_by_os(values)
|
||||
local my_os = get_os()
|
||||
if values[my_os] then return values[my_os] end
|
||||
if values[MY_OS] then return values[MY_OS] end
|
||||
return values.others
|
||||
end
|
||||
|
||||
MY_OS = get_os()
|
||||
|
||||
return {
|
||||
set_by_os = set_by_os
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue