From d5805041f5cc197cf7867fbb26acfdb67049d9a7 Mon Sep 17 00:00:00 2001 From: mrjk Date: Mon, 17 Apr 2023 14:41:24 -0400 Subject: [PATCH] add: option to disable last_id --- lib/idmgr_mod_id.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/idmgr_mod_id.sh b/lib/idmgr_mod_id.sh index 2fb9312..e2596d7 100644 --- a/lib/idmgr_mod_id.sh +++ b/lib/idmgr_mod_id.sh @@ -112,7 +112,6 @@ idm_id__show () idm_id__ls () { local active - #set -x for id in $(lib_id_get_all_id); do @@ -134,6 +133,12 @@ idm_id__ls () done | column -t -s: -o' ' #| lib_log DUMP - } +# List all available IDs names +idm_id__names () +{ + lib_id_get_all_id | xargs +} + idm_id__edit () { @@ -206,6 +211,7 @@ idm_id__rm () idm_id_save_last_id () { local id=${1} + [[ "${IDM_LAST_ID_SAVE:-true}" == "true" ]] || return 0 echo "$id" > "$IDM_DIR_CACHE/last_id" }