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

Commit 4f0cbcf

Browse files
kariudoJanDeDobbeleer
authored andcommitted
Fix issue #198 repeated path in console title
1 parent 8f64285 commit 4f0cbcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oh-my-posh.psm1

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function Set-Prompt {
2525
$prompt = (Write-Theme -lastCommandFailed $lastCommandFailed)
2626

2727
if($sl.Options.ConsoleTitle) {
28-
$folder = (Get-ChildItem).Parent.BaseName
28+
$folder = (Get-ChildItem | Select-Object -First 1).Parent.BaseName
2929
$prompt += "$([char]27)]2;$($folder)$([char]7)"
3030
if ($location.Provider.Name -eq "FileSystem") {
3131
$prompt += "$([char]27)]9;9;`"$($location.Path)`"$([char]7)"

0 commit comments

Comments
 (0)