From 2571357edc260c3954ac4470d5793df11cfde1a7 Mon Sep 17 00:00:00 2001 From: Topher Brown <206988+topher200@users.noreply.github.com> Date: Fri, 23 Aug 2024 21:59:20 -0400 Subject: [PATCH] new rr alias (#307) --- files/topherrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/files/topherrc b/files/topherrc index 70b8412b..c5364d88 100755 --- a/files/topherrc +++ b/files/topherrc @@ -88,6 +88,15 @@ function rds_ip_address() { aws rds describe-db-instances --output=json --region=us-east-1 | jq ".DBInstances[] | select(.DBInstanceIdentifier==\"$1\") | .Endpoint.Address" -r } + +# rerun the previous command until it succeeds +function rr { + trap "echo 'Interrupted'; return" INT + while ! eval "$(fc -ln -1)"; do + sleep 0.5 + done +} + ### END COMMAND LINE ALIASES ### ### INSTALL AND CONFIGURE APPLICATIONS ###