-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle arguments when passed with filename #91
base: master
Are you sure you want to change the base?
Conversation
so if I do "filename arg1 arg2" it works as expected, this doesn't manage to work when there are spaces in filenames, but this is good since spaces in filenames are really bad practice XD
will be good to document this in the pydoc and add a example script. @a1ext what do you think about this pr? |
Agree with you. @cryptid11 do you think it is good to just check for a whitespace? P.S. @radare, can you set up dummy appveyor/travisci for this repo? I'm planning to add some tests. |
in theory should be, except file with whitespace in name, right? anyway that was really useful for me, obviously if this create damage more than good should not be included. anyway integrate that with other checks if you feel, probably the code can also be cleaner, or other shapes you prefer (i prefer one line for example like |
what about checking if file is an array and handle r2pipe.open(['ls', '-l', '/'], ['-d']) or so?
… On 14 Jan 2019, at 22:02, cryptid11 ***@***.***> wrote:
in theory should be, except file with whitespace in name, right? anyway that was really useful for me, obviously if this create damage more than good should not be included.
anyway integrate that with other checks if you feel, probably the code can also be cleaner, or other shapes you prefer (i prefer one line for example like cmd = cmd[:1] + flags + cmd[1:-1] + [cmd[-1].split(' ')[0]] + ['-Rarg'+str(x+1)+'='+arg for x,arg in enumerate(filename.split(' ')[1:])]), etc
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#91 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AA3-lmb5azygwf53PfMIXsUNsSxtSeIBks5vDPB5gaJpZM4Z_LVg>.
|
good idea |
can you update the PR? do you agree with the change? |
@cryptid11 Could you adjust the code as @radare proposed:
|
honestly I forget this stuff, but if you tell me what to change in what I will do that surely |
The idea is to also handle the case where the function receives an array insteaad of a string |
please resolve conflicts |
410c2d8
to
d8b0642
Compare
so if I do "filename arg1 arg2" it works as expected, this doesn't manage to work when there are spaces in filenames, but this is good since spaces in filenames are really bad practice XD