Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix(cli): show help for subcommands
Browse files Browse the repository at this point in the history
If subcommands are called, e.g. `jsipfs dag` there was no output
at all. Now the help message (which you also get with `--help`
is displayed.
  • Loading branch information
vmx authored and daviddias committed Jan 24, 2018
1 parent d798d59 commit 8c63f8f
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions src/cli/commands/bitswap.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

module.exports = {
command: 'bitswap',
command: 'bitswap <command>',

description: 'Interact with the bitswap agent.',

Expand All @@ -10,6 +10,5 @@ module.exports = {
},

handler (argv) {
console.log('Type `jsipfs bitswap --help` for more information about this command')
}
}
2 changes: 1 addition & 1 deletion src/cli/commands/block.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

module.exports = {
command: 'block',
command: 'block <command>',

description: 'Manipulate raw IPFS blocks.',

Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

module.exports = {
command: 'bootstrap',
command: 'bootstrap <command>',

description: 'Show or edit the list of bootstrap peers.',

Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/dag.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

module.exports = {
command: 'dag',
command: 'dag <command>',

description: 'Interact with ipld dag objects.',

Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/file.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

module.exports = {
command: 'file',
command: 'file <command>',

description: 'Interact with IPFS objects representing Unix filesystems.',

Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/files.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

module.exports = {
command: 'files',
command: 'files <command>',

description: 'Operations over files (add, cat, get, ls, etc)',

Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/object.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

module.exports = {
command: 'object',
command: 'object <command>',

description: 'Interact with ipfs objects.',

Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/pubsub.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

module.exports = {
command: 'pubsub',
command: 'pubsub <command>',

description: 'pubsub commands',

Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/repo.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

module.exports = {
command: 'repo',
command: 'repo <command>',

description: 'Manipulate the IPFS repo.',

Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/swarm.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

module.exports = {
command: 'swarm',
command: 'swarm <command>',

description: 'Swarm inspection tool.',

Expand Down

0 comments on commit 8c63f8f

Please sign in to comment.