Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes help printout #274

Merged
merged 2 commits into from
Sep 2, 2015
Merged

Fixes help printout #274

merged 2 commits into from
Sep 2, 2015

Conversation

Frijol
Copy link
Member

@Frijol Frijol commented Sep 2, 2015

adds help for key command which fixes #173

Here's what it does

Before merge:

➜  t2-cli git:(master) ✗ t2

Usage: /usr/local/bin/iojs t2 <command>

command     one of: provision, restart, run, push, erase, list, init, wifi, key, rename, update

After merge:

➜  t2-cli git:(kb-help) t2

command argument is required

Usage: /usr/local/bin/iojs t2 <command>

command
  provision     Authorize your computer to control the USB-connected Tessel
  restart       Restart a previously deployed script in RAM or Flash memory. (Does not rebundle)
  run           Deploy a script to Tessel and run it with Node
  push          Pushes the file/dir to Flash memory to be run anytime the Tessel is powered, runs the file immediately once the file is copied over
  erase         Erases files pushed to Flash using the tessel push command
  list          Lists all connected Tessels and their authorization status.
  init          Initialize repository for your Tessel project
  wifi          Configure the wireless connection
  key           Generate a local SSH keypair for authenticating a Tessel VM
  rename        Change the name of a Tessel to something new.
  update        Update the Tessel firmware and openWRT image

Here's what was going on

nomnom.js specifies in the comments:

          // if there are a small number of commands and all have help strings,
          // display them in a two column table; otherwise use the brief version.
          // The arbitrary choice of "20" comes from the number commands git
          // displays as "common commands"

Since we don't have 20+ commands, I checked for help strings on all of our commands. Sure enough, one was missing. Adding it makes nomnom print out the much more useful two-column help format.

What to do

  • Can someone please check my help description for key? I'm not actually sure what it does, and it's not documented (see t2 key command is undocumented in CLI docs t2-docs#12)
  • Please be careful in adding any new commands or options to add a .help key. Perhaps we should have a test for this?

@rwaldron
Copy link
Contributor

rwaldron commented Sep 2, 2015

LGTM!

rwaldron added a commit that referenced this pull request Sep 2, 2015
@rwaldron rwaldron merged commit ed50ff9 into master Sep 2, 2015
@Frijol Frijol deleted the kb-help branch September 3, 2015 15:33
@Student007 Student007 mentioned this pull request Sep 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

We should add a help command
2 participants