cryptsetup luksOpen "$@"
}
-# iptables -I without duplication.
-iptI() { ${*/ -I/ -C/} 2>/dev/null || "$@"; }
-# iptables -A without duplication.
-iptA() { ${*/ -A/ -C/} 2>/dev/null || "$@"; }
+# ipti = iptables idempotent. Swaps -I/-A to -C to check if the rule exists, does not proceed if so.
+# Usage: ipti IPTABLES_ARGS... (where IPTABLES_ARGS includes -I or -A).
+#
+# Note: due to code golf, it expects no spaces in the arguments.
+ipti() { iptables ${*/ -[AI]/ -C/} 2>/dev/null || iptables "$@"; }
### how I calculated lswc-avg (at least for a btrfs filesystem):