Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Commit

Permalink
Always set window title
Browse files Browse the repository at this point in the history
Resolves #162
  • Loading branch information
JanDeDobbeleer committed Nov 2, 2019
1 parent ca5c837 commit 02374b1
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions oh-my-posh.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ function Set-Prompt {
Reset-CursorPosition
$prompt = (Write-Theme -lastCommandFailed $lastCommandFailed)

if ($env:ConEmuANSI -eq "ON") {
$location = Get-Location
$folder = (Get-Item $location.Path).Name
$prompt += "$([char]27)]2;$($folder)$([char]7)"
if ($location.Provider.Name -eq "FileSystem") {
$prompt += "$([char]27)]9;9;`"$($location.Path)`"$([char]7)"
}
$location = Get-Location
$folder = (Get-Item $location.Path).Name
$prompt += "$([char]27)]2;$($folder)$([char]7)"
if ($location.Provider.Name -eq "FileSystem") {
$prompt += "$([char]27)]9;9;`"$($location.Path)`"$([char]7)"
}

$prompt
Expand Down

0 comments on commit 02374b1

Please sign in to comment.