Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
710d42e248 | |||
244c188deb |
@ -23,3 +23,22 @@ __WHITE='\033[1;37m'
|
||||
__LIGHT_GRAY='\033[0;37m'
|
||||
|
||||
__COLOR_RESET='\033[0m'
|
||||
|
||||
__GET_RANDOM_COLOR() {
|
||||
local COLORS=(
|
||||
$__RED
|
||||
$__LIGHT_RED
|
||||
$__GREEN
|
||||
$__LIGHT_GREEN
|
||||
$__ORANGE
|
||||
$__YELLOW
|
||||
$__BLUE
|
||||
$__DARK_BLUE
|
||||
$__PURPLE
|
||||
$__DARK_PURPLE
|
||||
$__CYAN
|
||||
$__DARK_CYAN
|
||||
$__WHITE
|
||||
)
|
||||
print "$__COLOR_RESET${COLORS[$(shuf -i 1-${#COLORS[@]} -n 1)]}"
|
||||
}
|
||||
|
@ -92,16 +92,16 @@ __FZF_TAIL() { __FZF $@ --print-query | sed '/^$/d' | tail -n1; } # prefer selec
|
||||
|
||||
__READ() {
|
||||
[ $CI ] && {
|
||||
__ERROR 'currently in CI, but __READ explicitly requires terminal input'
|
||||
return 1
|
||||
__INFO 'currently in CI, skipping __READ'
|
||||
return 0
|
||||
}
|
||||
read $@ </dev/tty
|
||||
}
|
||||
|
||||
__EDIT() {
|
||||
[ $CI ] && {
|
||||
__ERROR 'currently in CI, but __EDIT explicitly requires terminal input'
|
||||
return 1
|
||||
__INFO 'currently in CI, skipping __EDIT'
|
||||
return 0
|
||||
}
|
||||
|
||||
__STATUS "opening '$1' for editing"
|
||||
|
Reference in New Issue
Block a user