NobGit
public imalexnord read

ms.open

Adds Mac "Open ." command to Windows

Languages

Repository composition by tracked source files.

PowerShell
PowerShell 100%
Create file Wiki Documentation
Clone
https://nobgit.com/user/imalexnord/ms.open.git
ssh://[email protected]:2222/user/imalexnord/ms.open.git

Trace

install.ps1

Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.

install.ps1 on main
Author Date Commit Line Code
Alex Nord 11 days ago a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
1
[CmdletBinding()]
Open commit View diff
1 [CmdletBinding()]
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
2
param()
Open commit View diff
2 param()
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
3
Open commit View diff
3
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
4
Set-StrictMode -Version Latest
Open commit View diff
4 Set-StrictMode -Version Latest
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
5
$ErrorActionPreference = 'Stop'
Open commit View diff
5 $ErrorActionPreference = 'Stop'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
6
Open commit View diff
6
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
7
$root = $PSScriptRoot
Open commit View diff
7 $root = $PSScriptRoot
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
8
$binPath = Join-Path $root 'bin'
Open commit View diff
8 $binPath = Join-Path $root 'bin'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
9
$shellScript = Join-Path $root 'shell\MS.Open.ps1'
Open commit View diff
9 $shellScript = Join-Path $root 'shell\MS.Open.ps1'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
10
Open commit View diff
10
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
11
if (-not (Test-Path -LiteralPath $binPath -PathType Container)) {
Open commit View diff
11 if (-not (Test-Path -LiteralPath $binPath -PathType Container)) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
12
    throw "Missing bin directory: $binPath"
Open commit View diff
12 throw "Missing bin directory: $binPath"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
13
}
Open commit View diff
13 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
14
Open commit View diff
14
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
15
if (-not (Test-Path -LiteralPath $shellScript -PathType Leaf)) {
Open commit View diff
15 if (-not (Test-Path -LiteralPath $shellScript -PathType Leaf)) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
16
    throw "Missing shell integration script: $shellScript"
Open commit View diff
16 throw "Missing shell integration script: $shellScript"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
17
}
Open commit View diff
17 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
18
Open commit View diff
18
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
19
function Normalize-PathEntry {
Open commit View diff
19 function Normalize-PathEntry {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
20
    param([string]$Value)
Open commit View diff
20 param([string]$Value)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
21
Open commit View diff
21
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
22
    if ([string]::IsNullOrWhiteSpace($Value)) {
Open commit View diff
22 if ([string]::IsNullOrWhiteSpace($Value)) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
23
        return ''
Open commit View diff
23 return ''
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
24
    }
Open commit View diff
24 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
25
Open commit View diff
25
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
26
    return $Value.Trim().TrimEnd('\')
Open commit View diff
26 return $Value.Trim().TrimEnd('\')
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
27
}
Open commit View diff
27 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
28
Open commit View diff
28
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
29
function Add-UserPath {
Open commit View diff
29 function Add-UserPath {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
30
    param([string]$PathToAdd)
Open commit View diff
30 param([string]$PathToAdd)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
31
Open commit View diff
31
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
32
    $current = [Environment]::GetEnvironmentVariable('Path', 'User')
Open commit View diff
32 $current = [Environment]::GetEnvironmentVariable('Path', 'User')
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
33
    $entries = @(
Open commit View diff
33 $entries = @(
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
34
        $current -split ';' |
Open commit View diff
34 $current -split ';' |
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
35
        ForEach-Object { Normalize-PathEntry $_ } |
Open commit View diff
35 ForEach-Object { Normalize-PathEntry $_ } |
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
36
        Where-Object { $_ }
Open commit View diff
36 Where-Object { $_ }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
37
    )
Open commit View diff
37 )
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
38
Open commit View diff
38
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
39
    $normalizedTarget = Normalize-PathEntry $PathToAdd
Open commit View diff
39 $normalizedTarget = Normalize-PathEntry $PathToAdd
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
40
    $alreadyPresent = $entries | Where-Object {
Open commit View diff
40 $alreadyPresent = $entries | Where-Object {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
41
        $_.Equals($normalizedTarget, [StringComparison]::OrdinalIgnoreCase)
Open commit View diff
41 $_.Equals($normalizedTarget, [StringComparison]::OrdinalIgnoreCase)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
42
    }
Open commit View diff
42 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
43
Open commit View diff
43
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
44
    if (-not $alreadyPresent) {
Open commit View diff
44 if (-not $alreadyPresent) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
45
        $newPath = (@($entries) + $normalizedTarget) -join ';'
Open commit View diff
45 $newPath = (@($entries) + $normalizedTarget) -join ';'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
46
        [Environment]::SetEnvironmentVariable('Path', $newPath, 'User')
Open commit View diff
46 [Environment]::SetEnvironmentVariable('Path', $newPath, 'User')
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
47
        Write-Host "Added to user PATH: $PathToAdd"
Open commit View diff
47 Write-Host "Added to user PATH: $PathToAdd"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
48
    }
Open commit View diff
48 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
49
    else {
Open commit View diff
49 else {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
50
        Write-Host "Already in user PATH: $PathToAdd"
Open commit View diff
50 Write-Host "Already in user PATH: $PathToAdd"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
51
    }
Open commit View diff
51 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
52
Open commit View diff
52
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
53
    $processEntries = @($env:Path -split ';')
Open commit View diff
53 $processEntries = @($env:Path -split ';')
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
54
    $inCurrentProcess = $processEntries | Where-Object {
Open commit View diff
54 $inCurrentProcess = $processEntries | Where-Object {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
55
        (Normalize-PathEntry $_).Equals($normalizedTarget, [StringComparison]::OrdinalIgnoreCase)
Open commit View diff
55 (Normalize-PathEntry $_).Equals($normalizedTarget, [StringComparison]::OrdinalIgnoreCase)
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
56
    }
Open commit View diff
56 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
57
Open commit View diff
57
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
58
    if (-not $inCurrentProcess) {
Open commit View diff
58 if (-not $inCurrentProcess) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
59
        $env:Path = "$env:Path;$PathToAdd"
Open commit View diff
59 $env:Path = "$env:Path;$PathToAdd"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
60
    }
Open commit View diff
60 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
61
}
Open commit View diff
61 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
62
Open commit View diff
62
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
63
function Update-PowerShellProfile {
Open commit View diff
63 function Update-PowerShellProfile {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
64
    param(
Open commit View diff
64 param(
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
65
        [Parameter(Mandatory)]
Open commit View diff
65 [Parameter(Mandatory)]
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
66
        [string]$ProfilePath,
Open commit View diff
66 [string]$ProfilePath,
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
67
Open commit View diff
67
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
68
        [Parameter(Mandatory)]
Open commit View diff
68 [Parameter(Mandatory)]
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
69
        [string]$IntegrationScript
Open commit View diff
69 [string]$IntegrationScript
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
70
    )
Open commit View diff
70 )
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
71
Open commit View diff
71
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
72
    $directory = Split-Path -Parent $ProfilePath
Open commit View diff
72 $directory = Split-Path -Parent $ProfilePath
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
73
    New-Item -ItemType Directory -Path $directory -Force | Out-Null
Open commit View diff
73 New-Item -ItemType Directory -Path $directory -Force | Out-Null
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
74
Open commit View diff
74
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
75
    $beginMarker = '# >>> MS.Open >>>'
Open commit View diff
75 $beginMarker = '# >>> MS.Open >>>'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
76
    $endMarker = '# <<< MS.Open <<<'
Open commit View diff
76 $endMarker = '# <<< MS.Open <<<'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
77
    $escapedScript = $IntegrationScript.Replace("'", "''")
Open commit View diff
77 $escapedScript = $IntegrationScript.Replace("'", "''")
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
78
Open commit View diff
78
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
79
    $block = @"
Open commit View diff
79 $block = @"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
80
$beginMarker
Open commit View diff
80 $beginMarker
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
81
`$msOpenShell = '$escapedScript'
Open commit View diff
81 `$msOpenShell = '$escapedScript'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
82
if (Test-Path -LiteralPath `$msOpenShell) {
Open commit View diff
82 if (Test-Path -LiteralPath `$msOpenShell) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
83
    . `$msOpenShell
Open commit View diff
83 . `$msOpenShell
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
84
}
Open commit View diff
84 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
85
$endMarker
Open commit View diff
85 $endMarker
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
86
"@
Open commit View diff
86 "@
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
87
Open commit View diff
87
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
88
    $content = ''
Open commit View diff
88 $content = ''
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
89
    if (Test-Path -LiteralPath $ProfilePath) {
Open commit View diff
89 if (Test-Path -LiteralPath $ProfilePath) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
90
        $content = Get-Content -LiteralPath $ProfilePath -Raw
Open commit View diff
90 $content = Get-Content -LiteralPath $ProfilePath -Raw
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
91
        $timestamp = Get-Date -Format 'yyyyMMdd-HHmmss'
Open commit View diff
91 $timestamp = Get-Date -Format 'yyyyMMdd-HHmmss'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
92
        Copy-Item -LiteralPath $ProfilePath -Destination "$ProfilePath.msopen-backup-$timestamp"
Open commit View diff
92 Copy-Item -LiteralPath $ProfilePath -Destination "$ProfilePath.msopen-backup-$timestamp"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
93
    }
Open commit View diff
93 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
94
Open commit View diff
94
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
95
    $pattern = "(?ms)^$([regex]::Escape($beginMarker)).*?^$([regex]::Escape($endMarker))\s*"
Open commit View diff
95 $pattern = "(?ms)^$([regex]::Escape($beginMarker)).*?^$([regex]::Escape($endMarker))\s*"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
96
    $cleaned = [regex]::Replace($content, $pattern, '').TrimEnd()
Open commit View diff
96 $cleaned = [regex]::Replace($content, $pattern, '').TrimEnd()
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
97
Open commit View diff
97
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
98
    if ($cleaned) {
Open commit View diff
98 if ($cleaned) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
99
        $newContent = "$cleaned`r`n`r`n$block`r`n"
Open commit View diff
99 $newContent = "$cleaned`r`n`r`n$block`r`n"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
100
    }
Open commit View diff
100 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
101
    else {
Open commit View diff
101 else {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
102
        $newContent = "$block`r`n"
Open commit View diff
102 $newContent = "$block`r`n"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
103
    }
Open commit View diff
103 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
104
Open commit View diff
104
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
105
    Set-Content -LiteralPath $ProfilePath -Value $newContent -Encoding UTF8
Open commit View diff
105 Set-Content -LiteralPath $ProfilePath -Value $newContent -Encoding UTF8
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
106
    Write-Host "Configured PowerShell profile: $ProfilePath"
Open commit View diff
106 Write-Host "Configured PowerShell profile: $ProfilePath"
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
107
}
Open commit View diff
107 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
108
Open commit View diff
108
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
109
Add-UserPath -PathToAdd $binPath
Open commit View diff
109 Add-UserPath -PathToAdd $binPath
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
110
Open commit View diff
110
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
111
$documents = [Environment]::GetFolderPath('MyDocuments')
Open commit View diff
111 $documents = [Environment]::GetFolderPath('MyDocuments')
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
112
$profiles = @(
Open commit View diff
112 $profiles = @(
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
113
    (Join-Path $documents 'WindowsPowerShell\Microsoft.PowerShell_profile.ps1'),
Open commit View diff
113 (Join-Path $documents 'WindowsPowerShell\Microsoft.PowerShell_profile.ps1'),
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
114
    (Join-Path $documents 'PowerShell\Microsoft.PowerShell_profile.ps1')
Open commit View diff
114 (Join-Path $documents 'PowerShell\Microsoft.PowerShell_profile.ps1')
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
115
) | Select-Object -Unique
Open commit View diff
115 ) | Select-Object -Unique
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
116
Open commit View diff
116
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
117
foreach ($profilePath in $profiles) {
Open commit View diff
117 foreach ($profilePath in $profiles) {
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
118
    Update-PowerShellProfile -ProfilePath $profilePath -IntegrationScript $shellScript
Open commit View diff
118 Update-PowerShellProfile -ProfilePath $profilePath -IntegrationScript $shellScript
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
119
}
Open commit View diff
119 }
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
120
Open commit View diff
120
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
121
Write-Host ''
Open commit View diff
121 Write-Host ''
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
122
Write-Host 'MS.Open is installed.'
Open commit View diff
122 Write-Host 'MS.Open is installed.'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
123
Write-Host 'Restart your terminal, then try:'
Open commit View diff
123 Write-Host 'Restart your terminal, then try:'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
124
Write-Host '  open .'
Open commit View diff
124 Write-Host ' open .'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
125
Write-Host '  mkcd test-folder'
Open commit View diff
125 Write-Host ' mkcd test-folder'
same change a6e9016

Added more mac commmands

Full commit hash
a6e9016ab8de81fdc3afb3d4d20e378cf4a6a92f
Author
Alex Nord <[email protected]>
Date
11 days ago
Selected line
126
Write-Host '  paths'
Open commit View diff
126 Write-Host ' paths'