chore: Remove mention of Windows entirely
I no longer use Windows, haven't touched it as my daily driver for 2-3 years now so these are useless.
This commit is contained in:
parent
4d443c4419
commit
6df95d746d
2 changed files with 0 additions and 74 deletions
|
@ -1,71 +0,0 @@
|
|||
function UsernameAtComputer
|
||||
{
|
||||
if (! "$env:ComputerName" -eq "") {
|
||||
$compname = $env:ComputerName
|
||||
}
|
||||
else {
|
||||
$compname = "unknown"
|
||||
}
|
||||
if (! "$env:UserName" -eq "") {
|
||||
$username = $env:UserName
|
||||
}
|
||||
if (! "$env:USER" -eq "") {
|
||||
$username = $env:USER
|
||||
}
|
||||
else {
|
||||
$username = "unknown"
|
||||
}
|
||||
"`e[35;1m" + $username + "`e[0m`e[1m@" + "`e[35;1m" + $compname
|
||||
}
|
||||
|
||||
# ----- set default color
|
||||
Set-PSReadlineOption -Colors @{ Parameter = "`e[96m"}
|
||||
Set-PSReadlineOption -Colors @{ Operator = "`e[96m"}
|
||||
Set-PSReadlineOption -Colors @{ String = "`e[93m"}
|
||||
|
||||
# ----- Messy function to make it looks like my zsh theme / git support
|
||||
function Git-Status
|
||||
{
|
||||
"$([char]27)[31m"
|
||||
if ((git status --porcelain -b 2>$1 | Select-String -Pattern 'M ') -notmatch 'fatal') {
|
||||
"!"
|
||||
}
|
||||
if ((git status --porcelain -b 2>$1 | Select-String -Pattern '\# ') -notmatch 'fatal') {
|
||||
"⇡"
|
||||
}
|
||||
if ((git status --porcelain -b 2>$1 | Select-String -Pattern '\? ') -notmatch 'fatal') {
|
||||
"?"
|
||||
}
|
||||
}
|
||||
function Git-Branch
|
||||
{
|
||||
" $([char]27)[35m " + (git branch --show-current)
|
||||
}
|
||||
function getdir
|
||||
{
|
||||
# ((Get-Location) -replace '[a-zA-Z].\\','~\') # change 'c:/' into '~' (optional)
|
||||
((Get-Location) -replace '/home/[a-zA-Z]*','~') # change '/home/<username>' into '~'
|
||||
}
|
||||
function end_of_prompt
|
||||
{
|
||||
"
|
||||
$([char]27)[32;1m$> $([char]27)[0m"
|
||||
}
|
||||
|
||||
# ----- Foreground (the thing that actually shows up)
|
||||
function prompt
|
||||
{
|
||||
if ((git log -n 1 2>$1) -notmatch 'fatal') {
|
||||
"
|
||||
$([char]27)[34;1m" + $env:COMPUTERNAME + "" + (getdir) + (Git-Branch) + " " + ("$(Git-Status)" -replace ' ','') + (end_of_prompt)
|
||||
}
|
||||
else
|
||||
{
|
||||
"
|
||||
$([char]27)[34;1m" + $env:COMPUTERNAME + "" + (getdir) + (end_of_prompt)
|
||||
}
|
||||
}
|
||||
|
||||
# ----- Aliases
|
||||
New-Alias vim nvim
|
||||
function q{exit}
|
|
@ -63,6 +63,3 @@ Add this to `/etc/zsh/zshenv` (**macOS**: `/etc/zshenv`)
|
|||
|
||||
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
|
||||
```
|
||||
|
||||
### For winders peeps
|
||||
Set $PROFILE environment variable to your powershell config file path (ex: $PROFILE='$HOME/.config/powershell/profile.ps1')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue