Hello Pavel,
v6 patch applies cleanly; make check ok; code, comments, doc & tests ok; various interactive tests I did ok.
Thanks for this useful little feature!
Let's see what committers think about it.
-- Fabien.