Add: A feature to hide some module output

This commit is contained in:
mrjk 2018-02-16 02:59:29 -05:00
parent 3b71430e50
commit cf52cf1bba
5 changed files with 14 additions and 1 deletions

Binary file not shown.

View File

@ -35,6 +35,8 @@ IDM_DIR_ID=${IDM_DIR_ID:-$IDM_CONFIG_DIR/id}
IDM_DIR_LIB=${IDM_DIR_LIB:-$IDM_DIR_ROOT/lib} IDM_DIR_LIB=${IDM_DIR_LIB:-$IDM_DIR_ROOT/lib}
IDM_DIR_CACHE=${IDM_DIR_CACHE:-${XDG_CACHE_HOME:-~/.cache}/idmgr} IDM_DIR_CACHE=${IDM_DIR_CACHE:-${XDG_CACHE_HOME:-~/.cache}/idmgr}
# Mod vars ...
IDM_DISABLE_AUTO=
# Main initialisation settings # Main initialisation settings
idm_init () idm_init ()
@ -233,8 +235,15 @@ idm_core_exec_mod ()
local val="idm_${i}${action}" local val="idm_${i}${action}"
if [ "$( type -t $val )" = function ]; then if [ "$( type -t $val )" = function ]; then
#set -x
# Skip if disabled ...
[[ ":${IDM_DISABLE_AUTO// /:}" =~ :${i}${action}: ]] && continue
#set +x
#lib_log INFO "Loading module $i ..." #lib_log INFO "Loading module $i ..."
[ "$sep" == "_" ] || lib_log NOTICE "$(printf "$sep" $i )" [ "$sep" == "_" ] || lib_log NOTICE "$(printf "$sep" $i )"
export IDM_MOD_EXEC=chain
${val} $id || \ ${val} $id || \
{ {
# DO NOT DISABLE THIS BLOCK, that force plugin to load in anyway # DO NOT DISABLE THIS BLOCK, that force plugin to load in anyway

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
IDM_MOD_DEPS="id" IDM_MOD_DEPS="id"
IDM_DISABLE_AUTO+=" git__enable git__disable git__kill "

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
IDM_MOD_DEPS="id pass gpg ssh" IDM_MOD_DEPS="id pass gpg ssh"
IDM_DISABLE_AUTO+="ps1__ls"
## Prompt functions ## Prompt functions
########################################## ##########################################

View File

@ -5,6 +5,9 @@ IDM_MOD_TAGS="id tool"
IDM_MOD_PROG="safe yadm" IDM_MOD_PROG="safe yadm"
IDM_MOD_PREF="core id" IDM_MOD_PREF="core id"
IDM_DISABLE_AUTO+=" tomb__enable tomb__disable tomb__kill "
## Tomb functions ## Tomb functions
########################################## ##########################################