From 88118fec7dc683e1c8af9c3038eab6fca9a68126 Mon Sep 17 00:00:00 2001 From: Suleyman Farajli Date: Thu, 19 Jun 2025 00:47:32 +0400 Subject: documentation update --- scripts/slib | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts/slib') 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: # ": 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}: # -- cgit v1.2.3