summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2025-06-19 00:47:32 +0400
committerSuleyman Farajli <suleyman@farajli.net>2025-06-19 00:47:32 +0400
commit88118fec7dc683e1c8af9c3038eab6fca9a68126 (patch)
treedae59ed87e5a396252b94a61a0b029a8e2039e50 /scripts
parent0d7f069d02e5ec38057cfbf7f06dd6f8b944a78e (diff)
documentation update
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/slib7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/slib b/scripts/slib
index 30e32ca..5ea05d6 100755
--- a/scripts/slib
+++ b/scripts/slib
@@ -15,7 +15,6 @@ argv0=$(basename "${0}")
# @EXAMPLE:
# err "Invalid usage" "Try '${argv0} -h' for help."
-
err() {
if [ "${1}" != "-x" ]; then
printf "%s: " "${argv0}"
@@ -32,7 +31,7 @@ err() {
# @FUNCTION: invalid_use
# USAGE: [-h]
# @DESCRIPTION:
-# Output a usage error message. If `-h` is not specified output:
+# Output a usage error message. If `-h` is not specified output:
# "<program>: Invalid usage "
# "Try 'program -h' for help."
# else output only:
@@ -72,6 +71,10 @@ check_program() {
# To add a failure message a success message must also be present.
# The output of the command is not suppressed.
#
+# This implementation does **not** use `eval`. Only simple commands and arguments are supported.
+# Shell control operators like `&&`, `||`, pipes (`|`), or redirection (`>`, `>>`, etc.) will not work.
+# This prevents unintended execution and makes it safe for use in scripts.
+#
# @EXAMPLE:
# Run xwallpaper command if success print out ${image}:
#