godspeed1989 / fbv

framebuffer image viewer
Other
79 stars 39 forks source link

fix man page + split the image names only on multiple image names #12

Closed sgerwk closed 3 years ago

sgerwk commented 3 years ago

The -n option (image names) is useful when the image that is shown comes from somewhere else - it is downloaded or converted to a temporary file. The name of the temporary file is not meaningful to the user, its source is. When the file comes from the Web, this is the url of the image. I made a bad decision when I chose ':' for the image name separator, as this character is in every url.

Every character may create similar problems in other contexts. A simpler solution is just not to split the image names when only one image is passed. This is the most common case, especially when the image comes from downloading or converting.

godspeed1989 commented 3 years ago

But you still don't fix the ':' problem for URLs :)

sgerwk commented 3 years ago

The easiest solution would be to switch from ':' to something else that is less common as an image title, like ';'. Do you think it would be reasonable?

godspeed1989 commented 3 years ago

According to this semicolon (";") is a reserved character which can be included in a URL. Maybe " is a more reasonable choice.

sgerwk commented 3 years ago

Thanks for the suggestion. Using " would be a bit inconvenient from shell scripts, so I switched to ^, which is not only disallowed in uris but is also rarely used in general.