gauth icon indicating copy to clipboard operation
gauth copied to clipboard

Command line argument that print only current code.

Open tuxmartin opened this issue 7 years ago • 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 https://github.com/pcarrier/gauth/blob/a2c540ca0307bd67b30fcb0ad79658ecd10e0595/gauth.go#L135

Thanks!

tuxmartin avatar Apr 22 '17 21:04 tuxmartin

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

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

iamkirkbater avatar Jun 25 '18 16:06 iamkirkbater

a flag would be really appreciated :)

gadelkareem avatar Apr 21 '20 14:04 gadelkareem

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.

pcarrier avatar Jan 29 '21 04:01 pcarrier