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

CLI now accepts strings as stdin #15

Merged
merged 6 commits into from
Jun 5, 2023
Merged

CLI now accepts strings as stdin #15

merged 6 commits into from
Jun 5, 2023

Conversation

AucaCoyan
Copy link
Contributor

Finally I modified clap to accept either a file or a string.

It came with a couple of architectural changes:

  • ➖ I decided to clean the Session struct, because it wasn't really relevant to have it.
  • Input was also a rock the way to interpret files to format. So also it was deleted for better code readability
  • ➕ I added 2 functions: format_single_file and format_string that redirects the code to format_inner, where the code is formatted. The first 2 functions have the responsibility of reading & writing the file, or writing to stdout respectably.

@AucaCoyan AucaCoyan mentioned this pull request Jun 5, 2023
22 tasks
@fdncred
Copy link
Collaborator

fdncred commented Jun 5, 2023

Looking good! Thanks again!

@fdncred fdncred merged commit 0b42976 into nushell:main Jun 5, 2023
1 check passed
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.

None yet

2 participants