aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-06-03 01:09:25 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-06-03 01:11:53 +1200
commit802729b618ad32986d640d34a085a819cf1752db (patch)
tree0820b042dd04953e907cfa99d430cb7022efc398
parentCheck presence of delimiters correctly (diff)
downloaddotfiles-802729b618ad32986d640d34a085a819cf1752db.tar.gz
dotfiles-802729b618ad32986d640d34a085a819cf1752db.zip
Nicer toggle
-rw-r--r--bin/mi5.awk6
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/mi5.awk b/bin/mi5.awk
index 0bcc1930..2deec375 100644
--- a/bin/mi5.awk
+++ b/bin/mi5.awk
@@ -11,13 +11,11 @@ BEGIN {
NR == 1 { printf "`" }
# Blocks
-NF == 1 && $1 == open && !mac {
- mac = 1
+NF == 1 && $1 == open && !mac++ {
printf "'"
next
}
-NF == 1 && $1 == shut && mac {
- mac = 0
+NF == 1 && $1 == shut && mac-- {
printf "`"
next
}