mirror of
https://github.com/opensiriusfox/bashrc.d.git
synced 2025-06-16 20:31:15 -07:00
added rv tester
This commit is contained in:
parent
262df90945
commit
5748a2178e
1 changed files with 12 additions and 5 deletions
17
functions.sh
17
functions.sh
|
@ -101,9 +101,16 @@ treep() { # short for tree pager
|
|||
fi
|
||||
}
|
||||
|
||||
ts() {
|
||||
( # so we don't get stuck in that folder
|
||||
cd "$HOME/Documents/GradSchool/Writing/0000-dissertation"
|
||||
grep -R "$1" *
|
||||
)
|
||||
function rv() {
|
||||
RV=$?
|
||||
if [[ $RV -eq 0 ]]; then
|
||||
COLOR='2'
|
||||
elif [[ $RV -eq 1 ]]; then
|
||||
COLOR='3'
|
||||
else
|
||||
COLOR='1'
|
||||
fi
|
||||
printf '\e[4%dm' $COLOR
|
||||
printf ' RV=%d \e[0m\n' $RV >&2
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue