Wip: fix the software ...
This commit is contained in:
parent
16fd26547c
commit
f722286fda
1
bin/idmgr.sh
Symbolic link
1
bin/idmgr.sh
Symbolic link
@ -0,0 +1 @@
|
||||
idmgr
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
IDM_MOD_DEPS="id pass gpg ssh"
|
||||
IDM_MOD_CLOUD_DEPS="s3"
|
||||
|
||||
## Prompt functions
|
||||
##########################################
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
IDM_MOD_DEPS="id"
|
||||
IDM_MOD_GIT_DEPS="s1 id ssh"
|
||||
IDM_DISABLE_AUTO+=" git__enable git__disable git__kill "
|
||||
|
||||
#idm_hook_register enable idm_git__enable 5
|
||||
|
||||
|
||||
## Environments
|
||||
##############################
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
IDM_MOD_DEPS="id"
|
||||
IDM_MOD_GPG_DEPS="s0 id"
|
||||
|
||||
|
||||
idm_gpg__help ()
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
IDM_MOD_DEPS=""
|
||||
IDM_MOD_ID_DEPS="s0"
|
||||
|
||||
## Identity functions
|
||||
##########################################
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
IDM_MOD_DEPS="id gpg"
|
||||
IDM_MOD_PASS_DEPS="s2"
|
||||
|
||||
|
||||
## Pass functions
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
IDM_MOD_DEPS="id pass gpg ssh"
|
||||
IDM_MOD_PS1_DEPS="s4 id pass gpg ssh"
|
||||
IDM_DISABLE_AUTO+="ps1__ls"
|
||||
|
||||
## Prompt functions
|
||||
@ -13,7 +13,7 @@ idm_ps1 ()
|
||||
local action=${1-}
|
||||
shift || true
|
||||
|
||||
idm_ps1_ls
|
||||
idm_ps1__ls
|
||||
}
|
||||
|
||||
idm_ps1__ls ()
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
IDM_MOD_DEPS="id gpg"
|
||||
IDM_MOD_SSH_DEPS="s0 id gpg"
|
||||
|
||||
# trap 'idm_ssh_kill' 0
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
IDM_MOD_DEPS="id gpg git"
|
||||
IDM_MOD_TOMB_DEPS="s3 id gpg git"
|
||||
IDM_MOD_TAGS="id tool"
|
||||
IDM_MOD_PROG="safe yadm"
|
||||
IDM_MOD_PREF="core id"
|
||||
|
||||
45
shell/bash/startup.sh
Normal file
45
shell/bash/startup.sh
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
export IDM_SHELL_PS1=${IDM_SHELL_PS1:-${PS1-}}
|
||||
IDM_SRC_WORDS=${IDM_SRC_WORDS-}
|
||||
IDM_BIN=${IDM_BIN:-idmgr}
|
||||
|
||||
i ()
|
||||
{
|
||||
|
||||
if grep -q ":${1:-NONE}:" <<<"${IDM_SRC_WORDS}"; then
|
||||
|
||||
result="$( $IDM_BIN $@)"
|
||||
|
||||
# Debug module
|
||||
if [ "${ID_DEBUG-}" == "true" ]; then
|
||||
if [ "${result:-NONE}" == "NONE" ]; then
|
||||
echo "======= ${result:-NONE}"
|
||||
else
|
||||
echo ======= Shell has sourced =======
|
||||
echo "${result:-NONE}"
|
||||
echo =======
|
||||
fi
|
||||
fi
|
||||
|
||||
# Parse output
|
||||
eval "$result"
|
||||
|
||||
else
|
||||
$IDM_BIN $@
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Disable when pressing C-b in shell :)
|
||||
bind -x '"\C-b": i disable'
|
||||
|
||||
|
||||
|
||||
# Show current identities
|
||||
echo "INFO: idmgr has been loaded, use 'idmgr' or 'i' to call it"
|
||||
#$IDM_BIN id ls
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user