use `notdir` instead of `lastword` + `subst`