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

Converted nux.cfg nux.json to nuxsh

Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
Tony Tkáčik 2020-01-01 13:16:18 +01:00
parent e148c76fbe
commit cceebef784
6 changed files with 130 additions and 264 deletions

View file

@ -42,6 +42,5 @@ if [ -t 1 ] {
readonly NC_error=$NC_Red
nux.log trace Terminal colors enabled
}
nux.log trace Terminal colors enabled

View file

@ -1,5 +1,9 @@
#!/usr/bin/env nuxsh
@namespace nux.help. {
## nux.help.shelldoc::
## Reads input from std-in and perform terminal-based colorization based on
## shelldoc format.
function :shelldoc {
sed -r \
-e "s/^## ?(.*)/${NC_White}\1${NC_No}/gI" \

View file

@ -9,7 +9,6 @@ if [ -t 1 ]; then
NC_LOG_No=`tput sgr0`
fi
NC_LOG_current=${NC_LOG_current:=3}
NC_LOG_id_none=0
NC_LOG_id_error=1
@ -19,6 +18,10 @@ NC_LOG_id_info=3
NC_LOG_id_debug=4
NC_LOG_id_trace=5
NC_LOG_current=${NC_LOG_current:=3}
##
## NUX Script environment provides basic logging capabilities.
##
@ -55,4 +58,8 @@ function nux.log.level {
NC_LOG_current=${!level_id}
}
if [ -n "$NUX_LOG_LEVEL" ]; then
nux.log.level "$NUX_LOG_LEVEL";
fi
nux.log trace Nux Logger included