diff --git a/zsh/.local/share/.gitignore b/zsh/.local/share/.gitignore index ef6bfe2..cf13270 100644 --- a/zsh/.local/share/.gitignore +++ b/zsh/.local/share/.gitignore @@ -1,2 +1,4 @@ # ignore all files in the stew directory stew/* +containers/ +direnv diff --git a/zsh/.local/share/zsh/functions/aws-get-secret b/zsh/.local/share/zsh/functions/aws-get-secret index d1c6f14..18b19d4 100644 --- a/zsh/.local/share/zsh/functions/aws-get-secret +++ b/zsh/.local/share/zsh/functions/aws-get-secret @@ -3,7 +3,9 @@ aws-get-secret () { if [[ -z "$secret_id" ]]; then secret_id=$(aws secretsmanager list-secrets \ + # build a tsv w/ name and date | jq -r '.SecretList | sort_by(.Name) | .[] | [.Name,.LastChangedDate] | @tsv' \ + # convert to tsv w/ full name, truncated name, date (no timestamp) | awk -F'\t' '{ full_name = $1; truncated_name = substr($1,1,30); @@ -11,6 +13,7 @@ aws-get-secret () { # Output: full_name (for return), truncated_name (for display), date (for display) printf "%s\t%-30s\t%s\n", full_name, truncated_name, date_parts[1] }' \ + # select via fzf, fields 2 & 3 | fzf \ --header="$(printf '%-30s\t%s\n' 'NAME' 'LAST_CHANGED_DATE')" \ --delimiter='\t' \