-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
ipfs ls
doesn't behave as expected on symlinks and regular files
#5502
Comments
Ideally, these would use the same logic. But I'll defer to @schomatis on this one. |
(or @kevina, I just know that schomatis has been working on MFS and unixfs relates stuff lately) |
@schomatis Maybe this issue could wait until those issues mentioned above are fixed. #5497 the same. |
Yes, The
But before jumping to any fix I would actually need that someone would clarify what's expected from those two commands, they don't seem the same to me (the plain "object" term is actually meaningless to me). |
@schomatis there is a third command that I didn't even knew existed until a few days ago (while working on the I agree |
Currently, some changes were made to the 1. file size $ ipfs ls <dir-path> -v
// ouput
Hash Size Name
QmdyxAUG6ZQ3gXVAmC4bSBNmLoCjePK6Frq7DSjBx4XWSs 14 bar
QmVW1c7cxuAyD49Wv6XxWDBoXFij66xo6U9nazM9QFdV6v 65 hello/ 2. symlink: $ ipfs ls <symlink-path>
// output
Error: cannot list symlinks yet 3. list a regular file: $ ipfs ls <file-path>
// output
QmdyxAUG6ZQ3gXVAmC4bSBNmLoCjePK6Frq7DSjBx4XWSs 14
$ ipfs ls <file-path> -v
// output
Hash Size Name
QmdyxAUG6ZQ3gXVAmC4bSBNmLoCjePK6Frq7DSjBx4XWSs 14 WDYT? |
😨 |
Can I suggest that some serious thought should be given to what's trying to be achieved here - and maybe it would be beneficial to take a step back and consider the broad picture: what should be the structure of the commands for For example, with respect to this bug report, it could be suggested that it's not a bug. The ipfs --help text clearly states that they should have different output:
and:
That being said, while not a bug, I think that the current command setup is.... counterintuitive. My initial reaction is that:
HOWEVER, I might be misinterpreting things, and ultimately I might be missing things because I'm not looking at the bigger picture. |
Yes, that's what I meant with my previous comment, but I think you have expressed it much more clearly. Non of the listed issues have any technical complexity, they are all low hanging fruit for someone to fix it, but I'd want to avoid posting |
(You caught me pre-edit, but all did was soften my language a tad :P) With regards to working towards a solution, I have a suggestion: Should we create a text representation of all ipfs commands in a tree like structure - and then hack away at it until we come up with something elegant and (relatively) future proof? Maybe a gist would be a good way to to manage revisions and suggestions for it.... |
Unless something has changed recently, GitHub does not send notifications out for gist comments, which will make it difficult if not impossible to keep up with. A better idea is to create a p.r. in the form of a documentation. This repo may not be the best place, but I am not sure where a better place may be. An other alternative is to create a new repo just for this purpose, populate it with the initial command list, then create a p.r. to modify it. Note, work towards this may already be on the way elsewhere. As a non-core memeber it is very difficult for me to keep up with all that is going on. This work will also effect |
That's a good point. A gist probably isn't the right place. For what its worth, to help look at the bigger bigger picture, I've put together a text document with all of https://gist.github.com/rob-deutsch/2a865aea11e05064d2b6e208d787a6bb |
Is there a way to list all files/folders added? i.e by |
Could someone change the title of this issue to be more specific? |
@redraw in an effort to keep issues on-topic, please ask unrelated questions on https://discuss.ipfs.io. |
ipfs ls
is not quite reasonableipfs ls
doesn't behave as expected on symlinks and regular files
I have two type ipfs path
QmRi5n1jzAtqGWQKJbeV4Sv3kGPt3XDfzhWojxiCVpKVdv
(is a symlink) andQmYuz8WeF7LbwmQB1enoMsEPgFoB2EYaxrEyxGXwceGsmZ
(just a regular file).both of them will print nothing.
But
The first command will print a error and second one print itself.
I think
ipfs file ls
is more reasonable thanipfs ls
at this point.WDYT?
@schomatis @Stebalien @magik6k
#5497
The text was updated successfully, but these errors were encountered: