Fix multiple prompt issues:

- fixed pwsh admin prompt colors
- update .bashrc prompt to match pwsh styling
- add dumb ascii art to .bashrc
pull/1/head
jowj 5 years ago
parent 2880f74f99
commit 435de2adfc

@ -1,16 +1,12 @@
#!/bin/bash
# glob filenames case-insensitively
shopt -s nocaseglob
shopt -s nocaseglob # glob filenames case-insensitively
shopt -s histappend # append history to history file, don't overwrite.
shopt -s checkwinsize # fix line wrap issues
# append history to history file, don't overwrite.
shopt -s histappend
# fix line wrap issues
shopt -s checkwinsize
set completion-ignore-case on # ignore case when tab-completing
# ignore case when tab-completing
set completion-ignore-case on
# find paths inside agares
export AGARES=${AGARES:-"$HOME/.agares"}
@ -50,12 +46,6 @@ export HISTFILESIZE=5000
export HISTCONTROL="ignorespace"
export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
@ -68,15 +58,23 @@ fi
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
export PS1="\t:\[$(tput sgr0)\]\[\033[38;5;93m\]\h\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput sgr0)\]\[\033[38;5;6m\][\w]:\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]✨ >> "
# this looks like garbage but its just color initation and termination
export PS1="\t \e[34mǰ \e[91m☭\e[0m "
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
echo ""
echo " /'-./\_ | $HOSTNAME"
echo " : ||,> |"
echo " \.-'|| | $0"
echo -e "\e[31m || BURIED\e[0m |"
echo -e "\e[31m || HATCHET\e[0m | $OSTYPE"
echo -e "\e[31m ||\e[0m |"
echo ""

@ -67,13 +67,13 @@ function Set-UserPrompt {
Write-Host $(get-date -format HH:mm:ss) -nonewline -foregroundcolor White
Write-Host " ǰ " -nonewline -foregroundcolor Blue
Write-Host "$DoublePrompt" -nonewline -foregroundcolor Green
$SoyAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if ($SoyAdmin) {
Write-Host " $($SpecialCharacters.HammerSickle) " -NoNewLine -ForegroundColor Red -BackgroundColor Yellow
Write-Host " $HammerSickle " -NoNewLine -ForegroundColor Red -BackgroundColor Yellow
}
else {
Write-Host $SpecialCharacters.DoublePrompt -NoNewLine -ForegroundColor White
Write-Host " $DoublePrompt " -NoNewLine -ForegroundColor Green
}
# Always return a string or PS will echo the standard "PS>" prompt and it will append to yours
return " "

@ -23,6 +23,7 @@ catch {
$osv = /usr/bin/uname -a
}
## Exported functions
function Show-AsciiHatchet {
@ -64,7 +65,7 @@ function Show-AsciiBWWindowsLogo {
function Show-AsciiCurvyWindowsLogo {
newline
whw -f red ' ,-~ ~-,' ; whw -f green ' ,_~ ~-, ' ; newline
whw -f red ' ,-~ ~-,' ; whw -f green ' ,_~ ~-, ' ; whw $env:COMPUTERNAME ; newline
whw -f red ' / /' ; whw -f green ' / / ' ; newline
whw -f red ' /,- -,/' ; whw -f green ' /,- -,/ ' ; whw $psv ; newline
whw -f blue ' ,-~ ~-,' ; whw -f yellow ' ,_~ ~-, ' ; newline

Loading…
Cancel
Save