1
1
Fork 0
mirror of https://github.com/tonydamage/nux-env.git synced 2025-12-11 13:24:28 +01:00

nuxfs: Added macro support.

Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
Tony Tkáčik 2017-06-11 00:17:56 +02:00
parent 7479fb53f8
commit 6ec235ce19
4 changed files with 45 additions and 17 deletions

View file

@ -74,3 +74,15 @@ function nux.eval {
nux.log trace Going to evaluate "$@"
eval "$@"
}
function nux.exec.optional {
local FUNC="$1"; shift;
if nux.check.function $FUNC; then
nux.log trace Executing optional: ${NC_White}${FUNC}${NC_No} "$@";
$FUNC "$@"
fi
}
function nux.dirty.urlencode {
echo -n "$1" | sed "s/ /%20/g"
}