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

[wallet bugfix] - Wallet interactive mode does not accept whitespaces in arguments #1795

Merged
merged 2 commits into from
May 5, 2022

Conversation

patrickkuo
Copy link
Contributor

use shell_words::split(line) to split cmd line input for the interactive shell instead of splitting by whitespace, shell_words::split perform the same split as unix split (remove quotes etc), this makes the wallet command behave the same in interactive or non-interactive mode.

@patrickkuo patrickkuo added Type: Bug Something isn't working dogfooding labels May 4, 2022
@@ -216,3 +217,19 @@ fn test_completer_with_cache() {
.collect::<Vec<_>>();
assert_eq!(vec!["--gas"], candidates);
}

#[test]
fn test_split_line() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think an easy test would be to run this through the BLNS.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I will try to add that after DevNet

Copy link
Contributor

@arun-koshy arun-koshy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool testing suggestion from Francois, but other than that LGTM! Thanks for the quick fix.

@patrickkuo patrickkuo merged commit 48f7a69 into main May 5, 2022
@patrickkuo patrickkuo deleted the pat/interactive_shell_split_whitespace_bugfix branch May 5, 2022 00:43
longbowlu pushed a commit that referenced this pull request May 12, 2022
… in arguments (#1795)

* changed transfer -> transfer-coin

* add unit test
punwai pushed a commit that referenced this pull request Jul 27, 2022
… in arguments (#1795)

* changed transfer -> transfer-coin

* add unit test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dogfooding Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants