This change was incorrect. "first_word" both "read"s one line and discards everything after a space. "sed" operates on many lines. Thus, more than on Exec in a desktop file are both legal and incorrectly joined together into command as "first\nsecond\third".
A postmortem:
+- command="`grep -E "^Exec( \[[^]=] *])?=" "$file" | cut -d= -f 2- | first_word`" \[[^]=] *])?=" "$file" | cut -d= -f 2- | sed -e 's/ .*$//'`"
++ command="`grep -E "^Exec(
This change was incorrect. "first_word" both "read"s one line and discards everything after a space. "sed" operates on many lines. Thus, more than on Exec in a desktop file are both legal and incorrectly joined together into command as "first\ nsecond\ third".