#1086667 renameutils: imv auto-completes paths below ~/ but mv will fail ENOENT

Package:
renameutils
Source:
renameutils
Description:
Programs to make file renaming easier
Submitter:
Marcel Partap
Date:
2024-11-03 14:09:02 UTC
Severity:
normal
Tags:
#1086667#5
Date:
2024-11-03 14:05:59 UTC
From:
To:
Because of readline, imv (or icp) happily will complete paths beginning with ~/
($HOME), but after confirmation, the invoked mv process will fail at syscall
renameat2() with ENOENT because of quoting.

execve("/usr/bin/mv", ["mv", "-vi", "/ztmp/FILE", "--", "~/FILE"],
0x55b49de21ad0 /* 89 vars */) = 0
renameat2(AT_FDCWD, "/ztmp/FILE", AT_FDCWD, "~/FILE", RENAME_NOREPLACE) = -1
ENOENT (No such file or directory)

mv: cannot move 'FILE' to '~/FILE': No such file or directory