Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cryptid11
Copy link

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

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
@radare
Copy link
Collaborator

radare commented Jan 14, 2019

will be good to document this in the pydoc and add a example script. @a1ext what do you think about this pr?

@a1ext
Copy link
Contributor

a1ext commented Jan 14, 2019

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.

@cryptid11
Copy link
Author

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

@radare
Copy link
Collaborator

radare commented Jan 15, 2019 via email

@a1ext
Copy link
Contributor

a1ext commented Jan 15, 2019

what about checking if file is an array and handle r2pipe.open(['ls', '-l', '/'], ['-d']) or so?

good idea

@radare
Copy link
Collaborator

radare commented Apr 15, 2019

can you update the PR? do you agree with the change?

@a1ext
Copy link
Contributor

a1ext commented Apr 16, 2019

@cryptid11 Could you adjust the code as @radare proposed:

what about checking if file is an array and handle r2pipe.open(['ls', '-l', '/'], ['-d']) or so?

@cryptid11
Copy link
Author

honestly I forget this stuff, but if you tell me what to change in what I will do that surely

@radare
Copy link
Collaborator

radare commented Jun 23, 2019

The idea is to also handle the case where the function receives an array insteaad of a string

@trufae trufae requested a review from as0ler December 11, 2020 11:00
@trufae
Copy link
Contributor

trufae commented Jun 3, 2022

please resolve conflicts

@trufae trufae force-pushed the master branch 2 times, most recently from 410c2d8 to d8b0642 Compare April 9, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants