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

fix(cli): alias add, cat and get to top-level cli #493

Merged
merged 1 commit into from
Nov 10, 2016

Conversation

victorb
Copy link
Member

@victorb victorb commented Sep 15, 2016

Aliases add, cat and get to be in the top-level namespace of the cli.

Reference: #455 (comment)

Left to do:

  • Add tests for aliases

@victorb victorb added the status/in-progress In progress label Sep 15, 2016
@victorb victorb mentioned this pull request Sep 15, 2016
6 tasks
@dignifiedquire
Copy link
Member

We also need this for the http api. Also please add some sanity tests to check these actually exist and work.

@victorb
Copy link
Member Author

victorb commented Sep 15, 2016

@dignifiedquire oh, wasn't aware of that. All right, adding a TODO in PR.

@@ -15,6 +15,8 @@ updateNotifier({
yargs
.commandDir('commands')
.demand(1)
// Temporary alias of {add,cat,get}
.commandDir('commands/files')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is more the other way around. {add, cat, get} are temporary alias of { fileas add, files cat, files get}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diasdavid Hm, probably have to change the wording. My understanding is that files add, files cat and files get is here to stay. add, cat and get is what is the aliases and the code here is aliasing add/cat/get to files add/files cat/files get but the comment doesn't seem to be informative enough.

Have any ideas on how to improve it?

Copy link
Member

@daviddias daviddias Sep 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What you just said is correct :)

You can replace the comment to

// NOTE: This creates an alias of `jsipfs files {add, get, cat}` to `jsipfs {add, get, cat}`. This will stay until https://github.com/ipfs/specs/issues/98 is resolved.

@daviddias
Copy link
Member

Add aliases in API as well

Which API? The core API should follow the interface-ipfs-core spec, which only defines files {add, cat, get}.

@Kubuxu
Copy link
Member

Kubuxu commented Sep 16, 2016

I think the http-api.

@victorb
Copy link
Member Author

victorb commented Sep 17, 2016

@diasdavid can you please take a look at my comment: #493 (comment)

And answer if this has to be for the http-api as well

@daviddias
Copy link
Member

@victorbjelkholm answered :)

@dignifiedquire dignifiedquire mentioned this pull request Sep 22, 2016
2 tasks
@daviddias
Copy link
Member

@victorbjelkholm #488 is blocked on this, anything blocking you?

@victorb
Copy link
Member Author

victorb commented Sep 22, 2016

@diasdavid no, I'll get this ready asap

@victorb
Copy link
Member Author

victorb commented Sep 22, 2016

@diasdavid done with adding tests etc, ready to merge as soon as travis finishes.

@dignifiedquire
Copy link
Member

@victorbjelkholm I also need those on the http-api

@daviddias
Copy link
Member

@victorbjelkholm it is missing a get alias test

@daviddias
Copy link
Member

Hey! Seems that this one got lost in time, can we get it shipped soon?

@victorb
Copy link
Member Author

victorb commented Oct 31, 2016

@diasdavid yes, absolutely, just missing one test and then it's ready. I dropped the ball on this and I'll jump right on it again!

@victorb
Copy link
Member Author

victorb commented Nov 10, 2016

Added test, so this is ready to merge now @diasdavid @dignifiedquire

@daviddias
Copy link
Member

Sweeeet 🍰 ! :D

@daviddias daviddias merged commit 2e15235 into ipfs:master Nov 10, 2016
@daviddias daviddias removed the status/in-progress In progress label Nov 10, 2016
@victorb victorb deleted the add-files-aliases branch October 6, 2017 09:41
MicrowaveDev pushed a commit to galtproject/js-ipfs that referenced this pull request May 22, 2020
License: MIT
Signed-off-by: Jacob Heun <jacobheun@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants