aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%
diff options
context:
space:
mode:
Diffstat (limited to '%HOME%')
-rw-r--r--%HOME%/.bash_utils/text.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/%HOME%/.bash_utils/text.sh b/%HOME%/.bash_utils/text.sh
index 47e6435..88118f9 100644
--- a/%HOME%/.bash_utils/text.sh
+++ b/%HOME%/.bash_utils/text.sh
@@ -80,7 +80,7 @@ str_contains() (
set -o errexit -o nounset -o pipefail
if [ "$#" -ne 2 ]; then
- echo "usage: ${FUNCNAME[0]} STR SUB"
+ echo "usage: ${FUNCNAME[0]} STR SUB" >&2
return 1
fi
@@ -95,7 +95,7 @@ str_starts_with() (
set -o errexit -o nounset -o pipefail
if [ "$#" -ne 2 ]; then
- echo "usage: ${FUNCNAME[0]} STR SUB"
+ echo "usage: ${FUNCNAME[0]} STR SUB" >&2
return 1
fi
@@ -117,10 +117,10 @@ str_split() (
shift
case "$key" in
-h|--help)
- echo "usage: ${FUNCNAME[0]} [-h|--help] [-0|-z] [--] STR DELIM"
+ echo "usage: ${FUNCNAME[0]} [-h|--help] [-0|-z|--zero] [--] STR DELIM"
return 0
;;
- -0|-z)
+ -0|-z|--zero)
fmt='%s\0'
;;
--)
@@ -139,7 +139,7 @@ str_split() (
args+=("$@")
if [ "${#args[@]}" -ne 2 ]; then
- echo "usage: ${FUNCNAME[0]} [-h|--help] [-0|-z] [--] STR DELIM"
+ echo "usage: ${FUNCNAME[0]} [-h|--help] [-0|-z|--zero] [--] STR DELIM" >&2
return 1
fi
@@ -160,7 +160,7 @@ str_join() (
set -o errexit -o nounset -o pipefail
if [ "$#" -lt 1 ]; then
- echo "usage: ${FUNCNAME[0]} DELIM [STR]..."
+ echo "usage: ${FUNCNAME[0]} DELIM [STR]..." >&2
return 1
fi