mirror of
https://github.com/eth-p/bat-extras.git
synced 2024-12-13 09:40:42 +01:00
Fixed libraries
This commit is contained in:
parent
30416b89b6
commit
6f3cc53bda
@ -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
18
lib/str.sh
Normal 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"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user