Bug 101 - -P pipe flag does not work with -o output flag when providing options which include spaces
Summary: -P pipe flag does not work with -o output flag when providing options which i...
Status: CONFIRMED
Alias: None
Product: abcde
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: All All
: Normal minor
Assignee: Steve McIntyre
URL:
Depends on:
Blocks:
 
Reported: 2019-10-02 05:59 BST by dudanian
Modified: 2019-10-02 05:59 BST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dudanian 2019-10-02 05:59:19 BST
I was trying to a very simple mp3 output using the following command:

  $ abcde -n -p -P -o mp3:"--preset voice"

but this was failing saying that "Unix pipes not compatible with multiple outputs". It looks like the code checks the number of outputs using spaces:

NUM_OUTPUT_TYPES="$(echo "$OUTPUTTYPE" | tr , \  | wc -w )"

which is clearly assuming that $OUTPUTTYPE doesn't already have spaces in it.

Trivial fix could be to just `tr --delete \ ` or something to delete real spaces before replacing commas with spaces.