pcarrier/gauth

Command line argument that print only current code.

Opened this issue · 3 comments

Hi,
is possible to add command line argument that print only current code?

Program output:

  $ gauth
             prev   curr   next
  AWS        315306 135387 483601
  Airbnb     563728 339206 904549
  Google     453564 477615 356846
  Github     911264 548790 784099
  [=======                      ]

I need something like:

  $ gauth --curr
              curr   
  AWS        135387 
  Airbnb      339206 
  Google     477615 
  Github      548790 
  [=======                      ]

I do not want to remove variables from

gauth/gauth.go

Line 135 in a2c540c

fmt.Printf("%-10s %s %s %s\n", name, prevToken, currentToken, nextToken)

Thanks!

Wouldn't you be able to use awk for this?

gauth | awk '{$2=$4=""; print $0}'

a flag would be really appreciated :)

There might soon be a -csv (#42) that outputs a format closer to what you'd like now (name, current token, next token, seconds to next token), but doesn't look super nice. I realize showing the previous token is quirky but so am I; flag addition welcome if that really affects you.