-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
beautify 'ipfs ls' and 'ipfs object links' #833
Conversation
@cryptix could you rebase on latest master? |
7b9370d
to
2226059
Compare
@whyrusleeping done! |
I like all that green. While were here, and I notice command outputs changing, I realize that there are no sharness tests for |
I currently have some strange issue with running the shareness suite locally. I would like for you to take that part. |
@cryptix not a problem! Ill try and get to those today |
2226059
to
b2034b4
Compare
hm.. I just saw that shareness actually builds the other shareness deps from the Godeps. My last commit might not be an good idea if we want to do that. |
9d5d6f3
to
0ca206d
Compare
Yeah, ideally we can keep all sharness deps building from what's in the repo. ( |
Code LGTM. Adding the |
f4e61de
to
3134c9d
Compare
3134c9d
to
220aaf2
Compare
LGTM. merging |
beautify 'ipfs ls' and 'ipfs object links'
Since 607468a (beautify 'ipfs ls' and 'ipfs object links', #833) we've had these. That pull request was about text/tabwriter [1] elastic tabstops [2], but we don't need a column separator at the end of each line. [1]: https://golang.org/pkg/text/tabwriter/ [2]: http://nickgravgaard.com/elastic-tabstops/index.html
Since 607468a (beautify 'ipfs ls' and 'ipfs object links', #833) we've had these. That pull request was about text/tabwriter [1] and elastic tabstops [2], but we don't need a column separator at the end of each line. [1]: https://golang.org/pkg/text/tabwriter/ [2]: http://nickgravgaard.com/elastic-tabstops/index.html
Since 607468a (beautify 'ipfs ls' and 'ipfs object links', #833) we've had these. That pull request was about text/tabwriter [1] and elastic tabstops [2], but we don't need a column separator at the end of each line. [1]: https://golang.org/pkg/text/tabwriter/ [2]: http://nickgravgaard.com/elastic-tabstops/index.html Licence: MIT Signed-off-by: W. Trevor King <[email protected]>
Since 607468a (beautify 'ipfs ls' and 'ipfs object links', #833) we've had these. That pull request was about text/tabwriter [1] and elastic tabstops [2], but we don't need a column separator at the end of each line. [1]: https://golang.org/pkg/text/tabwriter/ [2]: http://nickgravgaard.com/elastic-tabstops/index.html Licence: MIT Signed-off-by: W. Trevor King <[email protected]>
As discussed in #799, this PR pimps the output of
ipfs ls
andipfs object links
in text mode to use text/tabwriter which indents it nicely.In
ipfs ls
the DAG service is used to lookup theData
of the node to find out it's datatype. If it is a directory, it sets the new LinksIsDir
field to true, which is then used by the text marshallers to append a/
to the name.I wasn't sure if we want this for
object links
as well. would be trivial to add.before:

after:
