Skip to content

Commit

Permalink
Add Available Themes (#51)
Browse files Browse the repository at this point in the history
* Add Available Themes

* Update help

* highlighting theme -> color theme
  • Loading branch information
toshimaru committed Oct 22, 2019
1 parent 9c01692 commit 8f55e74
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
21 changes: 21 additions & 0 deletions README.md
Expand Up @@ -31,6 +31,27 @@ $ go get github.com/toshimaru/nyan
$ nyan FILE
```

## Available Themes

- abap
- dracula
- emacs
- monokai (default)
- monokailight
- pygments
- solarized-dark
- solarized-light
- swapoff
- vim

You can see available color themes with the command:

```
$ nyan --list-themes
```

![Available Themes](https://user-images.githubusercontent.com/803398/67260792-42a91000-f4d8-11e9-9b92-19c0072987e3.png)

## What is nyan?

`nyan` originates from [nyan-cat](http://www.nyan.cat/).
Expand Down
10 changes: 5 additions & 5 deletions main.go
Expand Up @@ -28,15 +28,15 @@ var rootCmd = &cobra.Command{
Short: "Colored cat command.",
Long: "Colored cat command which supports syntax highlighting.",
Example: `$ nyan FILE
$ nyan FILE1 FILE2
$ nyan -t solarized-dark FILE1`,
$ nyan FILE1 FILE2 FILE3
$ nyan -t solarized-dark FILE`,
RunE: cmdMain,
}

func init() {
rootCmd.PersistentFlags().BoolVarP(&showVersion, "version", "v", false, `show version`)
rootCmd.PersistentFlags().StringVarP(&theme, "theme", "t", "monokai", fmt.Sprintf("color theme\navailable themes: %s", styles.Names()))
rootCmd.PersistentFlags().BoolVarP(&listThemes, "list-themes", "T", false, `list available themes`)
rootCmd.PersistentFlags().BoolVarP(&showVersion, "version", "v", false, `Show version`)
rootCmd.PersistentFlags().StringVarP(&theme, "theme", "t", "monokai", fmt.Sprintf("Set color theme for syntax highlighting\nAvailable themes: %s", styles.Names()))
rootCmd.PersistentFlags().BoolVarP(&listThemes, "list-themes", "T", false, `List available color themes`)
}

func main() {
Expand Down

0 comments on commit 8f55e74

Please sign in to comment.