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 + docs] Added history command and more interactive shell doc #765

Merged
merged 5 commits into from
Mar 15, 2022

Conversation

patrickkuo
Copy link
Contributor

@patrickkuo patrickkuo commented Mar 11, 2022

  • added history command
  • added docs for interactive shell functionalities - history, tab completion and env variable substitution
  • changed binaries installation instruction in doc, using cargo install instead of build.

TODOs/ future enhancement :

  • support history expansion?
  • define environment variables within the wallet shell?
  • save/load history to/from file?


In order to build a Move package and run code defined in this package,
clone the Sui repository to the current directory and build:
### Installing the binaries
Copy link
Contributor

Choose a reason for hiding this comment

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

This section is referenced from move.md in the following sentence:

"In order to be able to build a Move package and run code defined in this package, first clone the Sui repository to the current directory and build Sui binaries."

It would be good to update this reference as part of this PR, possibly rewriting it a bit to avoid redundancy, for example:

"In order to be able to build a Move package and run code defined in this package first install Sui binaries as described here."

Looking a bit further in the text, I realize that sui-move command is not installed here, but I think that it probably should, rather than describing cloning, cargo etc. in move.md

Copy link
Contributor Author

@patrickkuo patrickkuo Mar 11, 2022

Choose a reason for hiding this comment

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

Ah didn't know this is referenced from elsewhere...
Will it make more sense to split out installing cargo and sui binaries to its own file? Usually installation/building instruction should locate in the Get Started section.

cc @Clay-Mysten

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah didn't know this is referenced from elsewhere...

That's totally understandable :-)

Will it make more sense to split out installing cargo and sui binaries to its own file? Usually installation/building instruction should locate in the Get Started section.
cc @Clay-Mysten

This is a good question and @Clay-Mysten is the best person to answer I think. On one hand including full instructions in move.md is less error prone, but on the other hand it's a bit redundant. Considering a low level of redundancy, though, perhaps it's not so bad after all.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, this should fall in a central Install section that is still missing from our doc set. Sam has asked for IDE setup there, as well. I would like minimal hardware and software requirements.

@sblackshear asked @lxfind to take a run at this in the Dev Portal Sitemap comments thread (the best thing we have to an overall doc tracker at the moment). Someone, please help centralize this knowledge and then link to it from all required pages.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will remove the --bin flag in the instruction so all the binaries will be installed.

We can decide where to move this section when the central install section is more complete

Copy link
Contributor

@Clay-Mysten Clay-Mysten left a comment

Choose a reason for hiding this comment

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

I would settle upon whether you want to precede commands with dollar signs ($) as my tests from GitHub showed they got picked up in the copy when using the built-in copy command function. Try it yourself in previous mode.

@patrickkuo
Copy link
Contributor Author

I would settle upon whether you want to precede commands with dollar signs ($) as my tests from GitHub showed they got picked up in the copy when using the built-in copy command function. Try it yourself in previous mode.

The dollar signs was "inspired" by rust doc :)

I do notice the copy button will copy the dollar sign as well... however I think we need to somehow distinguish the input form the output, are there better way to do this?

@Clay-Mysten
Copy link
Contributor

I would settle upon whether you want to precede commands with dollar signs ($) as my tests from GitHub showed they got picked up in the copy when using the built-in copy command function. Try it yourself in previous mode.

The dollar signs was "inspired" by rust doc :)

I do notice the copy button will copy the dollar sign as well... however I think we need to somehow distinguish the input form the output, are there better way to do this?

Sadly, I don't see a quick fix and the issue is pervasive:
meilisearch/integration-guides#103
react-boilerplate/react-boilerplate#757
DavidKinder/Inform6#26

In my old content management system, the dollar signs were included in view but stripped upon copy:
https://source.android.com/setup/start#initialize_and_sync_the_code

@Jibz1 for ideas in our system.

@Clay-Mysten Clay-Mysten requested a review from Jibz1 March 12, 2022 00:02
@patrickkuo
Copy link
Contributor Author

patrickkuo commented Mar 12, 2022

I would settle upon whether you want to precede commands with dollar signs ($) as my tests from GitHub showed they got picked up in the copy when using the built-in copy command function. Try it yourself in previous mode.

The dollar signs was "inspired" by rust doc :)
I do notice the copy button will copy the dollar sign as well... however I think we need to somehow distinguish the input form the output, are there better way to do this?

Sadly, I don't see a quick fix and the issue is pervasive: meilisearch/integration-guides#103 react-boilerplate/react-boilerplate#757 DavidKinder/Inform6#26

In my old content management system, the dollar signs were included in view but stripped upon copy: https://source.android.com/setup/start#initialize_and_sync_the_code

@Jibz1 for ideas in our system.

Ah that make sense now..... we only need dollar sign when the input and output are mixed in one code block, as (meilisearch/integration-guides#103) illustrated.

@patrickkuo patrickkuo force-pushed the pat/wallet_history_and_docs branch from 33e317d to 8b2c673 Compare March 12, 2022 00:16
@patrickkuo patrickkuo requested review from awelc and Clay-Mysten March 12, 2022 00:26
@patrickkuo
Copy link
Contributor Author

@Clay-Mysten @awelc , I have addressed most of the comments, can I have a thumbs up if this looks ok to you?

patrickkuo and others added 5 commits March 15, 2022 16:01
* added docs for interactive shell functionalities - history, tab completion and env variable substitution
* changed binaries installation instruction in doc, using cargo install instead of build.
Make edits to latest additions (history, namely)
@patrickkuo patrickkuo force-pushed the pat/wallet_history_and_docs branch from d196c86 to b4fe33b Compare March 15, 2022 16:02
@patrickkuo
Copy link
Contributor Author

@awelc are you ok with the changes?

@awelc
Copy link
Contributor

awelc commented Mar 15, 2022

@awelc are you ok with the changes?

Sorry, did not know that you waited for my stamp as well...

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.

3 participants