~brkdak


#2 open command cannot handle spaces 2 years ago

Ticket created by ~brkdak on ~exec64/imv

Both in imv's own command line and through the IPC, spaces are treated as path separators no matter how they are quoted.

I believe the problem is that command_open() calls wordexp() on each argument, when the list was produced by simply splitting on spaces, instead of concatenating them and expanding it once.

Example:

open a b.png     # Tries to open 'a' and 'b.png' (OK)
open 'a b.png'  # Does nothing (???)
open "a b.png"  # Also does nothing (???)
open a\ b.png   # Tries to open 'b.png' (???)
open a\\ b.png  # Tries to open 'a\' and 'b.png' (OK...)