#214 The quotation in event hooks

Undecided
open
nobody
None
9
2013-02-11
2013-02-08
Deadooshka
No

It is about the quotation of the command in event hooks. I think it is not good idea to enclose the entire command line in quotes. It is hard to run it with its own parameters.
win7/32 aria2 v1.16.3.

Discussion

  • tujikawa

    tujikawa - 2013-02-09

    Do you think removing quotes and let user to enclose the command as necessary are better way to go? It might break existing applications which rely on the current behavior.

     
    Last edit: tujikawa 2013-02-09
  • Deadooshka

    Deadooshka - 2013-02-09

    I have the command line (1), which is executed only in the form (2) because of the quotes. It is not documented, and not very convenient.

    (1) WScript "c:\path\to\script.js" //Nologo //E:JScript
    
    (2) on-download-complete=WScript" "c:\path\to\script.js" //Nologo //E:"JScript
    

    p.s. I know about the batch files, but it is not always convenient.

     
    Last edit: Deadooshka 2013-02-09
  • tujikawa

    tujikawa - 2013-02-10

    The one possible solution is add an option to use command without quote. The default is off (thus, surround command with quotes) not to break existing applications.

     
  • tujikawa

    tujikawa - 2013-02-11

    Another solution: add switch to accept customizable command line string.
    The idea is:
    The user is now fully responsible to quote program and arguments.
    Instead of supplying fixed positional arguments (id, filename, etc), aria2 now replaces {id}, {filename}, etc with id and filename respectively. So user can do like this:

    "hook script" -a1 -b2 -id "{id}" -filename "{filename}"
    
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks