Fixed libraries

This commit is contained in:
Ethan P 2019-06-21 16:10:39 -07:00
parent 30416b89b6
commit 6f3cc53bda
No known key found for this signature in database
GPG Key ID: 1F8DF8091CD46FBC
2 changed files with 19 additions and 1 deletions

View File

@ -53,7 +53,7 @@ shiftopt() {
# EXIT 1 -- No option value was available.
shiftval() {
# Skip if a value was already provided.
if [[ -z "${ARG_VAL+x}" ]]; then
if [[ -n "${OPT_VAL+x}" ]]; then
return 0
fi

18
lib/str.sh Normal file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# bat-extras | Copyright (C) 2019 eth-p | MIT License
#
# Repository: https://github.com/eth-p/bat-extras
# Issues: https://github.com/eth-p/bat-extras/issues
# -----------------------------------------------------------------------------
# Converts a string to lower case.
tolower() {
tr "[[:upper:]]" "[[:lower:]]" <<< "$1"
}
# Converts a string to upper case.
toupper() {
tr "[[:lower:]]" "[[:upper:]]" <<< "$1"
}