The path completion doesn't actually use this `target`, though, right?

This splitting is irrelevant there, because we use Haskeline for that, and just feed it the entire line before the cursor.