modifs.mineures sans commentaires
This commit is contained in:
parent
2b90be29f8
commit
0009fe55d5
|
@ -8,14 +8,14 @@ if [ -z "$NULIBDIR" -o "$NULIBDIR" != "$NULIBINIT" ]; then
|
||||||
fi
|
fi
|
||||||
##@include base.init.sh
|
##@include base.init.sh
|
||||||
##@include base.core.sh
|
##@include base.core.sh
|
||||||
##@include base.string.sh
|
##@include base.str.sh
|
||||||
##@include base.num.sh
|
##@include base.num.sh
|
||||||
##@include base.bool.sh
|
##@include base.bool.sh
|
||||||
##@include base.array.sh
|
##@include base.array.sh
|
||||||
##@include base.output.sh
|
|
||||||
##@include base.input.sh
|
|
||||||
##@include base.split.sh
|
##@include base.split.sh
|
||||||
##@include base.path.sh
|
##@include base.path.sh
|
||||||
##@include base.args.sh
|
##@include base.args.sh
|
||||||
|
##@include base.input.sh
|
||||||
|
##@include base.output.sh
|
||||||
module: base "Chargement de tous les modules base.*"
|
module: base "Chargement de tous les modules base.*"
|
||||||
require: base.init base.core base.string base.num base.bool base.array base.output base.input base.split base.path base.args
|
require: base.init base.core base.str base.num base.bool base.array base.split base.path base.args base.input base.output
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
##@cooked nocomments
|
##@cooked nocomments
|
||||||
module: base.string "Fonctions de base: gestion des valeurs chaines"
|
module: base.str "Fonctions de base: gestion des valeurs chaines"
|
||||||
|
|
||||||
function: strmid "Afficher la plage \$1 de la valeur \$2..*
|
function: strmid "Afficher la plage \$1 de la valeur \$2..*
|
||||||
|
|
15
bin/nlman
15
bin/nlman
|
@ -4,6 +4,7 @@ NULIB_NO_IMPORT_DEFAULTS=1
|
||||||
source "$(dirname -- "$0")/../load.sh" || exit 1
|
source "$(dirname -- "$0")/../load.sh" || exit 1
|
||||||
|
|
||||||
LIST_FUNCS=
|
LIST_FUNCS=
|
||||||
|
SHOW_MODULE=
|
||||||
SHOW_FUNCS=()
|
SHOW_FUNCS=()
|
||||||
function nulib__define_functions() {
|
function nulib__define_functions() {
|
||||||
function nulib_check_loaded() {
|
function nulib_check_loaded() {
|
||||||
|
@ -15,8 +16,15 @@ function nulib__define_functions() {
|
||||||
}
|
}
|
||||||
function module:() {
|
function module:() {
|
||||||
if [ -n "$LIST_FUNCS" ]; then
|
if [ -n "$LIST_FUNCS" ]; then
|
||||||
esection "$1"
|
esection "$1: $2"
|
||||||
fi
|
fi
|
||||||
|
local module
|
||||||
|
SHOW_MODULE=
|
||||||
|
for module in "${SHOW_FUNCS[@]}"; do
|
||||||
|
if [ "$module" == "@$1" ]; then
|
||||||
|
SHOW_MODULE=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
NULIB_MODULE="$1"
|
NULIB_MODULE="$1"
|
||||||
if ! nulib_check_loaded "$1"; then
|
if ! nulib_check_loaded "$1"; then
|
||||||
NULIB_LOADED_MODULES+=("$1")
|
NULIB_LOADED_MODULES+=("$1")
|
||||||
|
@ -25,6 +33,9 @@ function nulib__define_functions() {
|
||||||
function function:() {
|
function function:() {
|
||||||
if [ -n "$LIST_FUNCS" ]; then
|
if [ -n "$LIST_FUNCS" ]; then
|
||||||
estep "$1"
|
estep "$1"
|
||||||
|
elif [ -n "$SHOW_MODULE" ]; then
|
||||||
|
esection "$1"
|
||||||
|
eecho "$2"
|
||||||
else
|
else
|
||||||
local func
|
local func
|
||||||
for func in "${SHOW_FUNCS[@]}"; do
|
for func in "${SHOW_FUNCS[@]}"; do
|
||||||
|
@ -41,7 +52,7 @@ require: DEFAULTS
|
||||||
modules=()
|
modules=()
|
||||||
args=(
|
args=(
|
||||||
"afficher l'aide d'une fonction nulib"
|
"afficher l'aide d'une fonction nulib"
|
||||||
#"usage"
|
"FUNCTIONS|@MODULES..."
|
||||||
-m:,--module: modules "charger des modules supplémentaires"
|
-m:,--module: modules "charger des modules supplémentaires"
|
||||||
-l,--list LIST_FUNCS=1 "lister les fonctions pour lesquelles une aide existe"
|
-l,--list LIST_FUNCS=1 "lister les fonctions pour lesquelles une aide existe"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue