change: default ssh tmout and shell id autorestore
This commit is contained in:
parent
429681c26f
commit
67e7e7953b
@ -326,7 +326,7 @@ background() {
|
|||||||
idm_ssh__agent_start() {
|
idm_ssh__agent_start() {
|
||||||
# local socket=$1
|
# local socket=$1
|
||||||
local id=$1
|
local id=$1
|
||||||
local life=5d
|
local life=4w
|
||||||
|
|
||||||
local socket_dir="${XDG_RUNTIME_DIR}/ssh-agent/${id}"
|
local socket_dir="${XDG_RUNTIME_DIR}/ssh-agent/${id}"
|
||||||
local socket="${socket_dir}/socket"
|
local socket="${socket_dir}/socket"
|
||||||
|
|||||||
@ -51,6 +51,13 @@ i_restore_last_id ()
|
|||||||
|
|
||||||
[[ "$IDM_LAST_ID_AUTOLOAD" == 'true' ]] || return 0
|
[[ "$IDM_LAST_ID_AUTOLOAD" == 'true' ]] || return 0
|
||||||
|
|
||||||
|
# Restore from SHELL_ID
|
||||||
|
if [[ -n "${SHELL_ID:-}" ]]; then
|
||||||
|
i enable $SHELL_ID
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Restore from last loaded shell
|
||||||
local IDM_DIR_CACHE=${IDM_DIR_CACHE:-${XDG_CACHE_HOME:-~/.cache}/idmgr}
|
local IDM_DIR_CACHE=${IDM_DIR_CACHE:-${XDG_CACHE_HOME:-~/.cache}/idmgr}
|
||||||
local state_file=$IDM_DIR_CACHE/last_id
|
local state_file=$IDM_DIR_CACHE/last_id
|
||||||
if [ -f "$state_file" ]; then
|
if [ -f "$state_file" ]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user