mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-21 02:55:37 -08:00
parent
0a3b317224
commit
45d6f5d412
|
@ -6,6 +6,18 @@ if '::UPGRADE::' == 'true' then
|
|||
print(notice)
|
||||
end
|
||||
|
||||
-- Cache PID
|
||||
|
||||
function generateCustomUUID()
|
||||
local template = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
|
||||
return string.gsub(template, '[x]', function(c)
|
||||
local v = math.random(0, 0xf)
|
||||
return string.format('%x', v)
|
||||
end)
|
||||
end
|
||||
|
||||
os.setenv("POSH_PID", generateCustomUUID())
|
||||
|
||||
-- Helper functions
|
||||
|
||||
local function get_priority_number(name, default)
|
||||
|
@ -25,11 +37,11 @@ local function get_priority_number(name, default)
|
|||
return default
|
||||
end
|
||||
end
|
||||
|
||||
os.setenv("POSH_CURSOR_LINE", console.getnumlines())
|
||||
-- Environment variables
|
||||
|
||||
local function environment_onbeginedit()
|
||||
os.setenv("POSH_CURSOR_LINE", console.getnumlines())
|
||||
|
||||
end
|
||||
|
||||
-- Local state
|
||||
|
|
Loading…
Reference in a new issue