-
Notifications
You must be signed in to change notification settings - Fork 144
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
Print selected folder/file to stdout when quitting gdu #85
Comments
This is unfortunately not possible due to how process environments work. You cannot change environment of parent process. I can implement the "Spawn shell in current directory" feature of ncdu though. Would that be benefitial for you? |
IMO it is not necessary that gdu changes the directory itself. It would be sufficient if gdu prints the selected directory/folder to stdout after quitting. Changing directory would then be possible with:
I think this would be much more flexible than the "Spawn shell in current directory" feature of ncdu. (My use case would be to call gdu directly from vifm, navigate in gdu to a folder/file and on quitting goto that folder/file in vifm so that I can copy/move/delele files there.) |
Thank you for implementing this! However, I'm not able to use it as described above. If I call simply However, if I run Example:
|
I am afraid this use case won't be possible. You cannot access stdin and stdout of the terminal in a sub-shell. Thus you cannot start interactive mode. |
I'd like to cd into a selected folder when quitting gdu, e.g. to copy/move/delete large files. This would probably be a new feature of gdu, since I haven't found indications that this is currently possible.
The text was updated successfully, but these errors were encountered: