Skip to content

Commit fc06226

Browse files
authored
Merge pull request #27 from pecigonzalo/rename
v0.7
2 parents 16cca52 + d872b9c commit fc06226

File tree

15 files changed

+77
-78
lines changed

15 files changed

+77
-78
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Oh-My-Powershell
2-
[![Join the chat at https://gitter.im/pecigonzalo/Oh-My-Powershell](https://badges.gitter.im/pecigonzalo/Oh-My-Powershell.svg)](https://gitter.im/pecigonzalo/Oh-My-Powershell?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
1+
# Oh-My-Posh
2+
[![Join the chat at https://gitter.im/pecigonzalo/Oh-My-Posh](https://badges.gitter.im/pecigonzalo/Oh-My-Posh.svg)](https://gitter.im/pecigonzalo/Oh-My-Posh?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
33

44
After getting tired of mantaining my powershell profile, I decided to split the components and improve it, as I already use (Oh-My-Zsh)[ohmyz.sh] I thought it would be a good idea to have something similar on Powershell.
55

@@ -13,7 +13,7 @@ Requires:
1313

1414
Run:
1515
```
16-
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/pecigonzalo/Oh-My-Powershell/master/install.ps1'))
16+
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/pecigonzalo/Oh-My-Posh/master/install.ps1'))
1717
```
1818

1919
Add the following line to your powershell profile:

install.ps1

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,31 @@ function Install-OMP {
1010
Check-Recommends
1111
Check-Dependencies
1212

13-
Write-Output "Deleting $Env:USERPROFILE\.oh-my-powershell"
14-
Remove-Item -Force -Recurse "$Env:USERPROFILE\.oh-my-powershell" -ErrorAction SilentlyContinue
13+
Write-Output "Deleting $Env:USERPROFILE\.oh-my-posh"
14+
Remove-Item -Force -Recurse "$Env:USERPROFILE\.oh-my-posh" -ErrorAction SilentlyContinue
1515
if ($local) {
1616
# Deploy from current folder
17-
Write-Output "Coping Oh-My-Powershell to its destination"
18-
Copy-Item -Recurse -Force .\ "$Env:USERPROFILE\.oh-my-powershell\"
17+
Write-Output "Coping Oh-My-Posh to its destination"
18+
Copy-Item -Recurse -Force .\ "$Env:USERPROFILE\.oh-my-posh\"
1919
} else {
2020
# Clone project
21-
Write-Output "Cloning Oh-My-Powershell from Github"
22-
git clone https://github.com/pecigonzalo/Oh-My-Powershell.git $Env:USERPROFILE\.oh-my-powershell
21+
Write-Output "Cloning Oh-My-Posh from Github"
22+
git clone https://github.com/pecigonzalo/Oh-My-Posh.git $Env:USERPROFILE\.oh-my-posh
2323
}
2424
# Copy module to the user modules folder
25-
Write-Output "Installting Oh-My-Powershell Module"
25+
Write-Output "Installting Oh-My-Posh Module"
2626
New-Item -Type Directory "$([Environment]::GetFolderPath("mydocuments"))\WindowsPowerShell\Modules" -Force | Out-Null
27-
Copy-Item -Recurse -Force $Env:USERPROFILE\.oh-my-powershell\modules\oh-my-powershell `
27+
Copy-Item -Recurse -Force $Env:USERPROFILE\.oh-my-posh\modules\oh-my-posh `
2828
"$([Environment]::GetFolderPath("mydocuments"))\WindowsPowerShell\Modules\"
2929
}
3030

3131
#
3232
# Install logic
3333
#
34-
if ( Test-Path $Env:USERPROFILE\.oh-my-powershell ) {
35-
Write-Output "Oh-My-Powershell is already installed"
34+
if ( Test-Path $Env:USERPROFILE\.oh-my-posh ) {
35+
Write-Output "Oh-My-Posh is already installed"
3636
if ( $force -eq $true ) {
37-
Write-Output "Reinstalling Oh-My-Powershell"
37+
Write-Output "Reinstalling Oh-My-Posh"
3838
Install-OMP
3939
}
4040
} else {

modules/oh-my-powershell/oh-my-powershell.psd1 renamed to modules/oh-my-posh/oh-my-posh.psd1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Module manifest for module 'Oh-My-Powershell'
2+
# Module manifest for module 'Oh-My-Posh'
33
#
44
# Generated by: GonzaloP
55
#
@@ -9,10 +9,10 @@
99
@{
1010

1111
# Script module or binary module file associated with this manifest.
12-
RootModule = 'oh-my-powershell.psm1'
12+
RootModule = 'oh-my-posh.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.6'
15+
ModuleVersion = '0.7'
1616

1717
# ID used to uniquely identify this module
1818
GUID = '5f403c28-05ed-4be1-ae0a-7fcfab30b4df'
@@ -27,7 +27,7 @@ CompanyName = 'Gonzalo Peci'
2727
Copyright = 'Copyright (c) 2015 MIT.'
2828

2929
# Description of the functionality provided by this module
30-
Description = 'Oh-My-Powershell Magic'
30+
Description = 'Oh-My-Posh Magic'
3131

3232
# Minimum version of the Windows PowerShell engine required by this module
3333
PowerShellVersion = '4.0'

modules/oh-my-posh/oh-my-posh.psm1

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Check if profile exists
2+
3+
If ( Test-Path ("$Env:USERPROFILE\.oh-my-posh.config.ps1") ) {
4+
Write-Output "Detected a Oh-My-Posh Profile"
5+
} else {
6+
cp $Env:USERPROFILE"\.oh-my-posh\template\oh-my-posh.config.ps1" $Env:USERPROFILE"\.oh-my-posh.config.ps1"
7+
}
8+
9+
# Load Profile var
10+
. $Env:USERPROFILE"\.oh-my-posh.config.ps1"
11+
12+
# Check for updates
13+
. $Env:USERPROFILE"\.oh-my-posh\tools\check_for_updates.ps1"
14+
15+
# Execute Oh-My-Powershell
16+
. $Env:USERPROFILE"\.oh-my-posh\oh-my-posh.ps1"
17+

modules/oh-my-powershell/oh-my-powershell.psm1

Lines changed: 0 additions & 17 deletions
This file was deleted.

oh-my-posh.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Install modules
2+
& "$Env:USERPROFILE\.oh-my-posh\tools\modules.ps1"
3+
4+
# Handle Plugins
5+
foreach ($plugin in $plugins) {
6+
Write-Verbose "Loading from: $Env:USERPROFILE\.oh-my-posh\plugins\$plugin"
7+
$files = Get-ChildItem $Env:USERPROFILE\.oh-my-posh\plugins\$plugin -Filter *.ps1
8+
foreach ($file in $files) {
9+
Write-Verbose " Loading file: $($file.FullName)"
10+
. $file.FullName
11+
}
12+
}
13+
14+
# Load theme
15+
. "$Env:USERPROFILE\.oh-my-posh\themes\$theme.ps1"

oh-my-powershell.ps1

Lines changed: 0 additions & 15 deletions
This file was deleted.

plugins/file_utils/file_utils.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
2-
3-
41
# Credit Adam Driscoll
52
# https://github.com/adamdriscoll/PoshInternals/blob/master/PendMoves.ps1
63
# This can also be installed by installing the module PoshInternals

plugins/psreadline/psreadline.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
###############################################################################
2-
# psreadline
2+
# psreadline configuration
33
# http://runas.me/2014/08/28/powershell-console-conemu-psreadline/
44
# http://www.reddit.com/r/sysadmin/comments/1rit4l/what_do_you_get_when_you_cross_bash_with_cmdexe/cdo3djk
55
###############################################################################

plugins/psutils/psutils.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Clone psutils if its not present
2-
if (!(Test-Path $PSScriptRoot/psutils)) {
2+
if (!(Test-Path "$PSScriptRoot\psutils")) {
33
Write-Host "Installing psutils"
44
git clone https://github.com/lukesampson/psutils $PSScriptRoot/psutils
55
}

0 commit comments

Comments
 (0)