Skip to content

remove gist description from single file raw view (#2886)#2888

Merged
mislav merged 4 commits intocli:trunkfrom
Ma3oBblu:gist-view-raw-fix
Feb 2, 2021
Merged

remove gist description from single file raw view (#2886)#2888
mislav merged 4 commits intocli:trunkfrom
Ma3oBblu:gist-view-raw-fix

Conversation

@Ma3oBblu
Copy link
Contributor

@Ma3oBblu Ma3oBblu commented Feb 1, 2021

this closes #2886

Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

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

This looks good! A couple of tweaks would still be needed.

In single-file mode, since we no longer need newlines to separate contents of different files, could we avoid printing \n\n below?

out += fmt.Sprintf("%s\n\n", content)

@Ma3oBblu
Copy link
Contributor Author

Ma3oBblu commented Feb 2, 2021

This looks good! A couple of tweaks would still be needed.

In single-file mode, since we no longer need newlines to separate contents of different files, could we avoid printing \n\n below?

out += fmt.Sprintf("%s\n\n", content)

fixed

@Ma3oBblu Ma3oBblu requested a review from mislav February 2, 2021 08:00
- Separate out logic to render a single file
- Render directly to stdout instead of to string slice
- Normalize whitespace between files; ensure no excessive trailing whitespace
- Add terminal pager support
- Sentence-case for flags
Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

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

Fantastic! Thank you for the updates

@mislav mislav merged commit 962791b into cli:trunk Feb 2, 2021
@Ma3oBblu Ma3oBblu deleted the gist-view-raw-fix branch February 2, 2021 16:26
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.

gh gist view --filename --raw should print file content as is without any decorations

2 participants