Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
utubo committed Nov 14, 2024
2 parents 283c0ee + 91836d3 commit df5a5ef
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Microsoft.PowerShell_profile.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# PS> New-Item -path $profile -type file -force
#

function prompt() {
$dirSep = [IO.Path]::DirectorySeparatorChar
$pathComponents = $PWD.Path.Split($dirSep)
$displayPath = if ($pathComponents.Count -le 3) {
$PWD.Path
} else {
'{1}{0}…{0}{2}' -f $dirSep, ($pathComponents[0]), ($pathComponents[-2,-1] -join $dirSep)
}
$displayPath + ">"
# "PS {0}$('>' * ($nestedPromptLevel + 1)) " -f $displayPath
}
set-psreadlineoption -Colors @{ InlinePrediction = $PSStyle.Foreground.BrightBlack }

1 change: 1 addition & 0 deletions install.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole("Administrators")) { Start-Process powershell.exe "-File `"$PSCommandPath`"" -Verb RunAs; exit }

New-Item -ItemType SymbolicLink -Value $PSScriptRoot/Microsoft.PowerShell_profile.ps1 -Path $PROFILE
New-Item -ItemType SymbolicLink -Value $PSScriptRoot/.gitignore_global -Path ~/.gitignore_global
New-Item -ItemType SymbolicLink -Value $PSScriptRoot/.gvimrc -Path ~/_gvimrc
New-Item -ItemType SymbolicLink -Value $PSScriptRoot/.vimrc -Path ~/_vimrc
Expand Down

0 comments on commit df5a5ef

Please sign in to comment.