bash-completion
bash-completion copied to clipboard
Allow completing '?' to the latest file in a directory
trafficstars
This completion change allows retrieving the latest file in any _filedir completion (whether it is the current directory or not).
Examples: mv ?<TAB> -> mv latest-file.pdf mv ~/Downloads/?<TAB> -> mv ~/Downloads/latest-file.pdf
Let's discuss at https://github.com/scop/bash-completion/discussions/637
This implementation has a few issues that would need fixing before accepting anyway, but I think the time is not right to go that deep into details as there are some larger concerns to resolve first.