moved load_conf top of files

This commit is contained in:
fatalerrors
2026-07-09 11:11:05 +02:00
parent d375a09623
commit 54da852ac3
14 changed files with 35 additions and 32 deletions

View File

@@ -34,6 +34,8 @@
# * OF SUCH DAMAGE. # * OF SUCH DAMAGE.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "compress"
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Smartly uncompress archives # Smartly uncompress archives
# Usage: utaz [option] [directorie(s)|file(s)] # Usage: utaz [option] [directorie(s)|file(s)]
@@ -839,6 +841,4 @@ export -f taz
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "compress"
# EOF # EOF

View File

@@ -34,6 +34,8 @@
# * OF SUCH DAMAGE. # * OF SUCH DAMAGE.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf disp
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Color definitions # Color definitions
set_colors() set_colors()
@@ -715,8 +717,7 @@ export -f mdcat
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Load disp section variables # Load color codes
load_conf disp
set_colors set_colors
# EOF # EOF

View File

@@ -34,6 +34,8 @@
# * OF SUCH DAMAGE. # * OF SUCH DAMAGE.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "filefct"
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Expand wildcards in a file/directory list and quote the results # Expand wildcards in a file/directory list and quote the results
# Usage: expandlist [options] <item1 [item2 ... itemN]> # Usage: expandlist [options] <item1 [item2 ... itemN]>
@@ -866,6 +868,4 @@ export -f finddead
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "filefct"
# EOF # EOF

View File

@@ -34,6 +34,8 @@
# * OF SUCH DAMAGE. # * OF SUCH DAMAGE.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "fun"
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Make non-IT peoples think you're busy doing something hard # Make non-IT peoples think you're busy doing something hard
# Usage: busy [options] [pattern] # Usage: busy [options] [pattern]
@@ -485,6 +487,4 @@ export -f hack
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "fun"
# EOF # EOF

View File

@@ -34,8 +34,9 @@
# * OF SUCH DAMAGE. # * OF SUCH DAMAGE.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------ load_conf git
# ------------------------------------------------------------------------------
# Built-in defaults (can be overridden from [git] section in profile.conf) # Built-in defaults (can be overridden from [git] section in profile.conf)
: "${GIT_MAIN_BRANCH:=main}" : "${GIT_MAIN_BRANCH:=main}"
: "${GIT_DEFAULT_REMOTE:=origin}" : "${GIT_DEFAULT_REMOTE:=origin}"
@@ -651,6 +652,4 @@ export -f groot
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf git
# EOF # EOF

View File

@@ -34,6 +34,8 @@
# * OF SUCH DAMAGE. # * OF SUCH DAMAGE.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf info
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Show profile version # Show profile version
# Usage: ver # Usage: ver
@@ -408,5 +410,4 @@ export -f showinfo
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf info
# EOF # EOF

View File

@@ -34,6 +34,10 @@
# * OF SUCH DAMAGE. # * OF SUCH DAMAGE.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf lang
# ------------------------------------------------------------------------------
# check if a given locale is installed on the system
locale_check() locale_check()
{ {
locale -a | grep -qx "$1" || { locale -a | grep -qx "$1" || {
@@ -42,6 +46,7 @@ locale_check()
} }
return 0 return 0
} }
export -f locale_check
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -172,11 +177,10 @@ build_locale_shortcuts()
unset cfg item alias loc fname locale_items unset cfg item alias loc fname locale_items
} }
export -f build_locale_shortcuts
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Dynamically build locale functions based on SET_LOCALE configuration
load_conf lang
build_locale_shortcuts build_locale_shortcuts
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# EOF # EOF

View File

@@ -34,6 +34,8 @@
# * OF SUCH DAMAGE. # * OF SUCH DAMAGE.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "net"
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Download a resource using curl, wget, or fetch. # Download a resource using curl, wget, or fetch.
# Usage: dwl [-t <seconds>] [-r|--resume] <url> [output_file] # Usage: dwl [-t <seconds>] [-r|--resume] <url> [output_file]
@@ -370,9 +372,4 @@ export -f myextip
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# EOF
load_conf "net"
# EOF # EOF

View File

@@ -34,6 +34,9 @@
# * OF SUCH DAMAGE. # * OF SUCH DAMAGE.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "packages"
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Detect the active package manager of the current distribution. # Detect the active package manager of the current distribution.
# Detection is based on /etc/os-release (ID / ID_LIKE), then falls back to # Detection is based on /etc/os-release (ID / ID_LIKE), then falls back to
@@ -272,6 +275,4 @@ export -f pkgf
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "packages"
# EOF # EOF

View File

@@ -34,6 +34,9 @@
# * OF SUCH DAMAGE. # * OF SUCH DAMAGE.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "processes"
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Search processes matching the given string # Search processes matching the given string
# Usage: ppg <string> # Usage: ppg <string>
@@ -515,7 +518,5 @@ export -f kt
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "processes"
# EOF # EOF

View File

@@ -34,6 +34,7 @@
# * OF SUCH DAMAGE. # * OF SUCH DAMAGE.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "prompt"
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Parse a prompt theme file safely — it is NEVER sourced or executed. # Parse a prompt theme file safely — it is NEVER sourced or executed.
@@ -599,8 +600,6 @@ _pt_theme="${CONF_prompt[PROMPT_THEME]:-}"
_pt_dir="${CONF_prompt[PROMPT_THEME_DIR]:-}" _pt_dir="${CONF_prompt[PROMPT_THEME_DIR]:-}"
[[ -n "$_pt_theme" ]] && load_theme "$_pt_theme" ${_pt_dir:+"$_pt_dir"} [[ -n "$_pt_theme" ]] && load_theme "$_pt_theme" ${_pt_dir:+"$_pt_dir"}
unset _pt_theme _pt_dir unset _pt_theme _pt_dir
load_conf "prompt"
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------

View File

@@ -34,6 +34,8 @@
# * OF SUCH DAMAGE. # * OF SUCH DAMAGE.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "pwd"
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# genpwd : generate a password with different criteria # genpwd : generate a password with different criteria
# Usage: genpwd [options] [--extracars=<cars>] [--length=<n>] [nb_passwd] # Usage: genpwd [options] [--extracars=<cars>] [--length=<n>] [nb_passwd]
@@ -478,6 +480,4 @@ export -f pwdscore
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "pwd"
# EOF # EOF

View File

@@ -34,6 +34,8 @@
# * OF SUCH DAMAGE. # * OF SUCH DAMAGE.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "rain"
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic rain-like engine and presets # Generic rain-like engine and presets
@@ -703,6 +705,4 @@ rainbow()
export -f rainbow export -f rainbow
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "rain"
# EOF # EOF

View File

@@ -34,6 +34,8 @@
# * OF SUCH DAMAGE. # * OF SUCH DAMAGE.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "ssh"
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Remove host entries (name and IP) from ~/.ssh/known_hosts for the active user # Remove host entries (name and IP) from ~/.ssh/known_hosts for the active user
# Usage: rmhost <hostname|ip> [hostname2|ip2 [...]] # Usage: rmhost <hostname|ip> [hostname2|ip2 [...]]
@@ -249,6 +251,4 @@ export -f ssr
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
load_conf "ssh"
# EOF # EOF