Snapcraft should respond to "help", "version", "-v", "--version"

Bug #1501222 reported by Mark Shuttleworth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Medium
Sergio Schvezov

Bug Description

Just playing with the snapcraft command, it would be good to handle:

  snapcraft help -> equivalent to snapcraft -h
  snapcraft version -> print a useful version number and prompt to "snapcraft help"
  snapcraft -v -> same as snapcraft version

Related branches

Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

And --version is the same as -v and "version".

Changed in snapcraft:
milestone: none → 0.4
Changed in snapcraft:
status: New → Fix Committed
Revision history for this message
Leo Arias (elopio) wrote :

snapcraft help, snapcraft -h and snapcraft --help all work.

snapcraft version, snapcraft -v and snapcraft --version don't work:

elopio@tangamandapio76:~/workspace/canonical/snapcraft$ bzr branch lp:snapcraft trunk
Branched 258 revisions.
elopio@tangamandapio76:~/workspace/canonical/snapcraft$ cd trunk/
elopio@tangamandapio76:~/workspace/canonical/snapcraft/trunk$ ./bin/snapcraft -v
usage: snapcraft [-h] [--version]
                 {init,shell,run,list-plugins,clean,help,pull,build,stage,snap,assemble,all}
                 ...
snapcraft: error: unrecognized arguments: -v
elopio@tangamandapio76:~/workspace/canonical/snapcraft/trunk$ ./bin/snapcraft --version
snapcraft (devel). Run "snapcraft help" to get started.
elopio@tangamandapio76:~/workspace/canonical/snapcraft/trunk$ ./bin/snapcraft version
usage: snapcraft [-h] [--version]
                 {init,shell,run,list-plugins,clean,help,pull,build,stage,snap,assemble,all}
                 ...
snapcraft: error: argument cmd: invalid choice: 'version' (choose from 'init', 'shell', 'run', 'list-plugins', 'clean', 'help', 'pull', 'build', 'stage', 'snap', 'assemble', 'all')

Changed in snapcraft:
status: Fix Committed → Confirmed
Changed in snapcraft:
assignee: nobody → Sergio Schvezov (sergiusens)
importance: Undecided → Medium
Changed in snapcraft:
status: Confirmed → Fix Committed
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Released in snapcraft 0.4

Changed in snapcraft:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.