-
Notifications
You must be signed in to change notification settings - Fork 113
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
[Feature request] Goto parent directory #82
Comments
That's a useful improvement! If there is only one root, determining the parent directory is trivial. If there are multiple roots one would have to check if they all belong to the same parent and behave as before if that's the case. Otherwise, like in My suggestion is to display an informative message like When it comes to implementing the traversal itself one can certainly be smart and reuse the existing tree to avoid duplication of work. |
Didn't know I can use dua with multiple paths like This feature should only work with one argument of path or no argument which means the current directory. This navigation feature works exactly like a file manager such as ranger |
The one implementing the feature will have to deal with
The current directory internally works as if one would have launched
If there is a more effective way of navigation in this particular case I think it's worth elaborating on that. |
Just like I said from #77 (comment) , dua is not working like ncdu or gdu that when ncdu/gdu are started, they will list the content of the target instead of the target itself, treating all the contents in the current directory as targets when starting dua without argument is really weird. Maybe add an option to get the size of the directory itself like du, and by default, make dua work like ncdu/gdu since most of the time we need the disk usage structure of the contents of the file system instead of just the size of the directory itself(honestly I simply use |
'weird' isn't a value statement, it's more like judgement based on personal experiences. As strange as it may seem for someone used to other ways, that won't make it less valid on its own and is how I like to use it. Admittedly, that's only true for Adding a flag to expand root paths to their children like What do you think? |
You can add options for different purposes, so everyone is happy Actually, I use
The above discussion is out of the topic from the current issue page. You said that you were concerned about the usage like Maybe you can change this design:
Honestly, I don't know why the multiple-targets usage exists from the first beginning, if I want to use dua for multiple targets, I would use one after another one, or side by side. Sorry about this long discussion, if you don't like those suggestions you can ignore them since most importantly this is your own project. |
Thanks for the thoughtful reply and sorry for the late response. Just now I managed to read it in full and hopefully understand. Off topic, the main takeaway for me is that listing just the size of a given directory, as in Applying the above to the cases you see, we'd get
I would be happy to experiment with inverting 2) with something like Thanks a lot for bearing with me on this - it might not always be easy but ultimately I am sure even more good things will result from this dialogue. |
Thanks, providing options for different purposes is always better than fixed in the code. Take your time, no hurry, and thanks for the project. |
When I use
dua i /path/a/b/c
, the top of directory will be directoryc
, after navigating inside the directory for a while, I want to go outside thec
root directory likeb
ora
or even to the final/
directory, currently dua cannot goto the parent of argument, I have to restart dua with the right arguemnt.Can you implement this feature?
The text was updated successfully, but these errors were encountered: