-
-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
ranger: Can't . ranger
to keep current directory
#265438
Comments
I think the easiest way forward here is probably to patch what the wrapper script would do directly into the |
Hello, is there any more interest in adding this capability? I use this very frequently on non-nix machines. |
@IogaMaster Are you still working on this? |
A possible workaround is to use yazi, which has a that functionality available as an alias as well: Yazi is also a lot faster than ranger, and is regularly getting new releases. EDIT: |
Sorry, I don't understand. How does that help work around the problem here? I tried |
There's a few lines of code in a couple shell languages here: https://yazi-rs.github.io/docs/quick-start#shell-wrapper |
I completly forgot i added myself to this |
#119052 actually tried implementing a solution to this years ago, maybe someone can pick that back up? |
Describe the bug
In most distributions, one is able to e.g.
alias r=". ranger"
in their shell. Sourcing theranger
entry point script makes it preserve the current directory to the one that was being browsed in the file manager before quitting it.However, this does not work in the nixpkgs version, because
ranger
is anixpkgs
-generated wrapper which usesexec
, and thus cannot be sourced with the same effect.Steps To Reproduce
Steps to reproduce the behavior:
. ranger
q
to quit RangerExpected behavior
The user should be returned to shell, in the directory browsed to in step 2.
Additional context
https://github.com/ranger/ranger/blob/136416c7e2ecc27315fe2354ecadfe09202df7dd/ranger.py#L6-L24
Notify maintainers
@toonn @magnetophon
Metadata
"x86_64-linux"
Linux 6.5.4-arch2-1, Arch Linux, noversion, rolling
yes
yes
nix-env (Nix) 2.17.0
/nix/store/l3bc30i71qshxa3mdj3dy8dj7zwqkh6s-source
The text was updated successfully, but these errors were encountered: