completion: simplify by using $prev