make defaults configurable

This commit is contained in:
fatalerrors
2026-04-15 13:38:08 +02:00
parent 85f02f4498
commit 9a006883b8
11 changed files with 269 additions and 40 deletions

View File

@@ -39,7 +39,7 @@
# Usage: expandlist [options] <item1 [item2 ... itemN]>
expandlist()
{
local separator=" "
local separator="${EXPANDLIST_DEFAULT_SEPARATOR:- }"
local PARSED
PARSED=$(getopt -o hs:n --long help,separator:,newline -n 'expandlist' -- "$@")
@@ -122,7 +122,7 @@ export -f expandlist
# -s, --shell: do nothing and display what will be executed
clean()
{
local recursive=0 force=0 outshell=0
local recursive=${CLEAN_DEFAULT_RECURSIVE:-0} force=0 outshell=0
# Define short and long options
local PARSED
@@ -236,7 +236,7 @@ export -f mcd
rmspc()
{
local recurs=0 verb=0 shell=0
local substchar="_" substchar_set=0
local substchar="${RMSPC_DEFAULT_CHAR:-_}" substchar_set=0
local mvopt=()
local PARSED
@@ -574,7 +574,7 @@ export -f file_stats
# -l : limit : number of files to return (default is 10)
findbig()
{
local details=0 limit=10 one_fs=0
local details=0 limit=${FINDBIG_DEFAULT_LIMIT:-10} one_fs=0
local PARSED
PARSED=$(getopt -o hdl:x --long help,details,limit:,one-fs -n 'findbig' -- "$@")
@@ -792,4 +792,6 @@ export -f finddead
# ------------------------------------------------------------------------------
load_conf "filefct"
# EOF