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

Commit

Permalink
Do not set prompt when importing oh-my-posh
Browse files Browse the repository at this point in the history
Closes #100
  • Loading branch information
JanDeDobbeleer committed Jul 10, 2019
1 parent 9f1806d commit f5950d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,20 @@ You need to use the [PowerShell Gallery][powershell-gallery] to install oh-my-po

Install posh-git and oh-my-posh:

```bash
```powershell
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
```

Enable the prompt:

```powershell
# Start the default settings
Set-Prompt
# Alternatively set the desired theme:
Set-Theme Agnoster
```

In case you're running this on PS Core, make sure to also install version 2.0.0-beta1 of `PSReadLine`

Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck
Expand Down
17 changes: 0 additions & 17 deletions oh-my-posh.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@
. "$PSScriptRoot\Helpers\PoshGit.ps1"
. "$PSScriptRoot\Helpers\Prompt.ps1"

<#
.SYNOPSIS
Method called at each launch of Powershell
.DESCRIPTION
Sets up things needed in each console session, aside from prompt
#>
function Start-Up {
if(Test-Path -Path ~\.last) {
(Get-Content -Path ~\.last) | Set-Location
Remove-Item -Path ~\.last
}

Set-Prompt
}

<#
.SYNOPSIS
Generates the prompt before each line in the console
Expand Down Expand Up @@ -217,4 +201,3 @@ Register-ArgumentCompleter `

$sl = $global:ThemeSettings #local settings
$sl.ErrorCount = $global:error.Count
Start-Up # Executes the Start-Up function, better encapsulation

0 comments on commit f5950d1

Please sign in to comment.