make defaults configurable
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user