Menu

#294 quoted url as argument via pbpaste will fail to download

Undecided
open
nobody
None
1
2013-03-24
2013-01-06
Sashka B
No

I'm creating alias to do few things and run into a problem:
Alias executes couple commands and on success starts download of resulting url, which is being copied into clipboard. Everything works fine, until I get URL which is has quotes.

So, here what I've got:

alias dljk="command1 && command2 && aira2c $(pbcopy)"

Everything works as expected if command2 puts into clipboard unquoted url, ie:

http://cdn.sstatic.net/apple/img/logo.png

In this case, I see in log following:

2013-01-06 16:19:51.718903 [DEBUG] [FeedbackURISelector.cc:85] FeedbackURISelector selected http://cdn.sstatic.net/apple/img/logo.png

But when I add quotes to this url, aria2c will result in error:

"http://cdn.sstatic.net/apple/img/logo.png"

But inn this case, I see in log following:

2013-01-06 16:21:15.672052 [DEBUG] [FeedbackURISelector.cc:85] FeedbackURISelector selected %22http://cdn.sstatic.net/apple/img/logo.png%22

What am I doing wrong, and if this is a bug, can this be fixed?

Discussion

  • tujikawa

    tujikawa - 2013-01-07

    Please remove quotes. Why did you add quotes?

     
  • Sashka B

    Sashka B - 2013-02-17

    there are spaces inside of url, so quotes are required. I've used, probably, not best example.

     
  • tujikawa

    tujikawa - 2013-03-24

    If you want to quote URL, just do it when handing it over to aria2 like this:

    alias dljk="command1 && command2 && aira2c \"$(pbcopy)\""
    
     

Log in to post a comment.

MongoDB Logo MongoDB