Re:I'm “still afraid to use spaces in file names” years old
by warkdarrior on Thursday November 11, 2021 @12:19PM
(#29190448)
That is just lazy programming. If the input "foo:bar" is ambiguous, the program should try both interpretations (HOST:FILE and FILE) and then present the user with a prompt that provides sufficient information.
"Does foo:bar refer to the local file `foo:bar' (size: 102kB, date: 2021-11-11) or to the file `bar' on host `foo' (FQDN: foo.example.com, IP address: 1.2.3.4)?
"Does foo:bar refer to the local file `foo:bar' (size: 102kB, date: 2021-11-11) or to the file `bar' on host `foo' (FQDN: foo.example.com, IP address: 1.2.3.4)?
1: local file `foo:bar'
2: file `bar' on remote host `foo'
Your selection: "