better colored messages, to work well with Solarized imported with consp

This commit is contained in:
Luke Sampson
2013-06-30 22:34:08 +10:00
parent 3c34045882
commit 1f2ead16f8
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ if("$path" -like "$abs_shimdir*") {
$shimtext = gc $path
$shimtext | sls '(?m)^\$path = ''([^'']+)''' | % { $_.matches[0].groups[1].value }
} else {
warn "(non-scoop) $path" -f yellow -nonewline
warn "(non-scoop) $path" -f darkyellow -nonewline
exit 1
}
+3 -3
View File
@@ -10,9 +10,9 @@ function format($str, $hash) {
}
# messages
function abort($msg) { write-host $msg -b darkred -f white; exit 1 }
function warn($msg) { write-host $msg -f yellow; }
function success($msg) { write-host $msg -b green -f black; }
function abort($msg) { write-host $msg -f darkred; exit 1 }
function warn($msg) { write-host $msg -f darkyellow; }
function success($msg) { write-host $msg -f darkgreen }
# apps
function appdir($app) { "$scoopdir\apps\$app" }
+1 -1
View File
@@ -112,7 +112,7 @@ function run($exe, $arg, $msg, $continue_exit_codes) {
write-host "exit code was $($proc.exitcode)"; return $false
}
} catch {
write-host -f red $_.exception.tostring()
write-host -f darkred $_.exception.tostring()
return $false
}
write-host "done"
+2 -2
View File
@@ -15,7 +15,7 @@ $append = "set shell=powershell.exe"
$append | out-file $dst -append -encoding ascii
if((gc $dst)[-1] -eq $append) {
write-host "ok" -f green
write-host "ok" -f darkgreen
} else {
write-host ((gc $dst) | select -last 3) -f red
write-host ((gc $dst) | select -last 3) -f darkred
}