I like the way it's written except I'd test that
the item ends up where it should instead of:
if (%item_to != %item_from) {
hdel %table_to %item_to
hdel %table_from %item_from
}
I'd also want a verbose option; something along the lines of:
Foo was moved from TableFoo to TableBar which now reads: Yada Yada Yada...
Bar was moved from TableBar to TableFoo which now reads: Blah Blah Blah...
(I'd truncate the actual data to a reasonable length to keep it in one line.)
So the idea behind %item_to != %item_from is to solve a problem with /hswap test_a test_b val1 val1 working the same as /hswap test_a test_b val1
I will also add a verbose mode with the -s switch that is used for the other hash functions.