-
Notifications
You must be signed in to change notification settings - Fork 542
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
nshlib/nsh_session: Arguments of subcommand was lost #2831
base: master
Are you sure you want to change the base?
nshlib/nsh_session: Arguments of subcommand was lost #2831
Conversation
1c91c88
to
2f68bf0
Compare
[Experimental Bot, please feedback here] Yes, this PR appears to meet the basic NuttX requirements, but could be improved. Here's why and how: Strengths:
Weaknesses and Suggestions for Improvement:
Example of Improved Testing Section:
nsh> sh -c "dd bs=1 count=10" < /dev/zero > /dev/null Output omits 'bs=1 count=10', effectively running just 'dd' with default parameters1+0 records in
nsh> sh -c "dd bs=1 count=10" < /dev/zero > /dev/null
By addressing these weaknesses, the PR will be significantly stronger and easier for reviewers to evaluate. Remember, clarity and detail are key to a successful pull request. |
1. It`s fine if subcommand has no argument sh -c dd 2. Argument(s) of subcommand will be lost sh -c dd bs=1 # Merge to one argument by using quotation is OK sh -c "dd bs=1" 3. Error case argv[0] = "sh"; argv[1] = "-c"; argv[2] = "dd"; argv[3] = "bs=1"; nsh_execute(..., argv, ...); Signed-off-by: wangjianyu3 <[email protected]>
2f68bf0
to
11e409f
Compare
Summary
Fix a bug that arguments of subcommand will be lost.
Impact
Bugfix of nshlib/nsh_session
Testing