first pass of merging in warp (doesn't build)
This commit is contained in:
@@ -21,9 +21,7 @@ function prompt {
|
||||
# Reset the prompt back to the default to avoid infinite loops if sourcing the bootstrap script has an error.
|
||||
$function:global:prompt = $global:_warpOriginalPrompt
|
||||
$username = [Environment]::UserName
|
||||
$epoch = [int](New-TimeSpan -Start ([DateTime]::new(1970, 1, 1, 0, 0, 0, 0)) -End ([DateTime]::UtcNow)).TotalSeconds
|
||||
$random = Get-Random -Maximum 32768
|
||||
$global:_warpSessionId = [int64]"$epoch$random"
|
||||
$global:_warpSessionId = [uint64]@@WARP_SESSION_ID@@
|
||||
$msg = ConvertTo-Json -Compress -InputObject @{ hook = 'InitShell'; value = @{ session_id = $_warpSessionId; shell = 'pwsh'; user = $username; hostname = [System.Net.Dns]::GetHostName() } }
|
||||
$encodedMsg = [BitConverter]::ToString([System.Text.Encoding]::UTF8.GetBytes($msg)).Replace('-', '')
|
||||
$oscStart = "$([char]0x1b)]9278;"
|
||||
|
||||
Reference in New Issue
Block a user