chubin / chubin/cheat.sh

styles-demo is inaccurate/out of date

Open
#278 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
41.7k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Calling `:styles-demo` appears to simply dump the file share/styles-demo.txt. It seems to be missing some styles and doesn't accurately demonstrate some styles.

Here's a screenshot of styles-demo:
![static-demo](https://user-images.githubusercontent.com/808185/105504038-4c9a5f80-5c95-11eb-9e9b-4efb14439b4c.png)

Here's a screenshot generated with the small script at the bottom of styles demo. (In this case, I tested with `git-pull` and changed `head` to `tail` since the first five lines of the output were all comments)
![dynamic-demo](https://user-images.githubusercontent.com/808185/105504174-73589600-5c95-11eb-958d-07869c39ce90.png)

Two things of note:
1. the format of the comments on the rainbow_dash is different
2. the sas style is missing from the styles-demo output

Some thoughts on resolution:
* update shares/styles-demo.sh
* change `:styles-demo` to return all styles dynamically, using a representative command output
* change `:styles-demo` to be a query parameter so one could do `curl cheat.sh/git-pull?styles-demo` and the get dynamic output for all existing styles, like in the script

_Edit: FWIW, I'm on MacOS using [iTerm2](https://iterm2.com/) with a light background_

Contributor guide

Open the contributing guide

Research direction

Start with shares/styles-demo.sh and the static share/styles-demo.txt output, then inspect how :styles-demo is assembled. Compare the static and dynamic demonstrations, including the rainbow_dash comment format and the missing sas style. Done means the styles demo accurately represents all existing styles or clearly implements the selected resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, shell
Domain
cli, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.