Giter VIP home page Giter VIP logo

nyan's Introduction

Release Go Build & Test Release with goreleaser Maintainability Test Coverage

nyan

Colored cat command which supports syntax highlighting.

OG image for nyan command

Installation

Homebrew

$ brew install toshimaru/nyan/nyan

go get

$ go get github.com/toshimaru/nyan

go install (requires Go 1.16+)

$ go install github.com/toshimaru/nyan@latest

Usage

$ nyan FILE

Available Options

Option Description
-h, --help Show help
-l, --language lang Specify language for syntax highlighting
-T, --list-themes List available color themes
-n, --number Output with line numbers
-t, --theme theme Set color theme for syntax highlighting

Available Color Themes

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

You can list and preview available color themes with the command:

$ nyan --list-themes

Available Themes

What is nyan?

nyan originates from Nyan Cat (Music by daniwell).

nyancat

nyan's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar johnmanjiro13 avatar mattn avatar nanasi880 avatar renovate[bot] avatar toshimaru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nyan's Issues

README

  • installation
  • etc.

Screenshot

Screen Shot 2019-08-14 at 22 29 21

Number option

Like cat -n or ---number

$ cat -n  README.md | head -10
     1	[![Release](https://img.shields.io/github/release/toshimaru/nyan.svg)](https://github.com/toshimaru/nyan/releases/latest)
     2	[![Build Status](https://travis-ci.com/toshimaru/nyan.svg?branch=master)](https://travis-ci.com/toshimaru/nyan)
     3	[![Actions Status](https://github.com/toshimaru/nyan/workflows/Go/badge.svg)](https://github.com/toshimaru/nyan/actions)
     4	[![Actions Status](https://github.com/toshimaru/nyan/workflows/Release/badge.svg)](https://github.com/toshimaru/nyan/actions)
     5	[![Maintainability](https://api.codeclimate.com/v1/badges/f5063da42c2e2b00e625/maintainability)](https://codeclimate.com/github/toshimaru/nyan/maintainability)
     6	[![Test Coverage](https://api.codeclimate.com/v1/badges/f5063da42c2e2b00e625/test_coverage)](https://codeclimate.com/github/toshimaru/nyan/test_coverage)
     7
     8	# nyan
     9
    10	Colored `cat` command which supports syntax highlighting.

READ from StdIn

$ cat
a
a
abc
abc
stdin := os.Stdin
stat, _ := stdin.Stat()
filename := args[0]

if stat.Size() > 0 {
    // code
}

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Generating snapshot on GitHub Actions gets an runtime error

Setting

Run goreleaser/goreleaser-action@master
  with:
    args: release --snapshot --skip-publish --rm-dist

The Error

homebrew tap formula
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x1546251]

goroutine 6 [running]:
github.com/goreleaser/goreleaser/internal/pipe/brew.dataFor(_, {{0xc000309e78, 0x4}, {{0xc000043e60, 0x9}, {0xc000043e80, 0xd}, {0x0, 0x0}}, {{0x23faf3e, ...}, ...}, ...}, ...)
	github.com/goreleaser/[email protected]/internal/pipe/brew/brew.go:306 +0x471
github.com/goreleaser/goreleaser/internal/pipe/brew.buildFormula(_, {{0xc000309e78, 0x4}, {{0xc000043e60, 0x9}, {0xc000043e80, 0xd}, {0x0, 0x0}}, {{0x23faf3e, ...}, ...}, ...}, ...)
	github.com/goreleaser/[email protected]/internal/pipe/brew/brew.go:227 +0xbe
github.com/goreleaser/goreleaser/internal/pipe/brew.doRun(_, {{0xc000309e78, 0x4}, {{0xc000043e60, 0x9}, {0xc000043e80, 0xd}, {0x0, 0x0}}, {{0x23faf3e, ...}, ...}, ...}, ...)
	github.com/goreleaser/[email protected]/internal/pipe/brew/brew.go:198 +0x5c8
github.com/goreleaser/goreleaser/internal/pipe/brew.runAll(0xc000285000, {0x0, 0x0})
	github.com/goreleaser/[email protected]/internal/pipe/brew/brew.go:100 +0x125
github.com/goreleaser/goreleaser/internal/pipe/brew.Pipe.Run({}, 0x3242170)
	github.com/goreleaser/[email protected]/internal/pipe/brew/brew.go:81 +0x45
github.com/goreleaser/goreleaser/internal/middleware/errhandler.Handle.func1(0x24061ca)
	github.com/goreleaser/[email protected]/internal/middleware/errhandler/error.go:14 +0x22
github.com/goreleaser/goreleaser/internal/middleware/logging.Log.func1(0x329e078)
	github.com/goreleaser/[email protected]/internal/middleware/logging/logging.go:34 +0x142
github.com/goreleaser/goreleaser/internal/middleware/skip.Maybe.func1(0x2284e60)
	github.com/goreleaser/[email protected]/internal/middleware/skip/skip.go:29 +0xf0
github.com/goreleaser/goreleaser/cmd.releaseProject.func1()
	github.com/goreleaser/[email protected]/cmd/release.go:113 +0x11d
github.com/caarlos0/ctrlc.(*Ctrlc).Run.func1()
	github.com/caarlos0/[email protected]/ctrlc.go:39 +0x29
created by github.com/caarlos0/ctrlc.(*Ctrlc).Run
	github.com/caarlos0/[email protected]/ctrlc.go:38 +0xaf
Error: The process '/Users/runner/hostedtoolcache/goreleaser-action/0.180.0/x64/goreleaser' failed with exit code 2

Invalid filename Exit Code

The following case exits with code 1.

cat: x: No such file or directory
$ cat config.ru x Rakefile
# frozen_string_literal: true

# This file is used by Rack-based servers to start the application.

require_relative "config/environment"

run Rails.application
cat: x: No such file or directory
# frozen_string_literal: true

# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require_relative "config/application"

Rails.application.load_tasks

task default: :spec

$ echo $?
1

related #55

Extra space is added.

$ nyan .github/workflows/test.yml
jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - name: Restore Go modules cache
        uses: actions/cache@v4
        with:
          path: ~/go/pkg/mod
          key: go-${{ runner.os }}-${{ hashFiles('go.mod') }}
          restore-keys: |
                        go-${{ runner.os }}-
$ cat .github/workflows/test.yml
jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - name: Restore Go modules cache
        uses: actions/cache@v4
        with:
          path: ~/go/pkg/mod
          key: go-${{ runner.os }}-${{ hashFiles('go.mod') }}
          restore-keys: |
            go-${{ runner.os }}-

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.