-
-
Notifications
You must be signed in to change notification settings - Fork 763
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
Spawned shell (!) with kitty (--cwd=current) #759
Comments
We took care of the chdir() thing in cfd4a66. Even if I spawn a shell within nnn and open thunar, I see it opening in the spawned directory: It's possible I don't quite understand what you are talking about. In that case, leaving it open for others to pitch in. |
I also see:
So the current working directory is set correctly within the spawned shell. I am not sure why any other elaborate mechanism is required for any other subsequent processing to understand which location should be opened in the next window. |
I tried a similar test by opening another tab in xfce4-terminal and I see it opens in home. So I think this is the problem you wanted to mention. |
Afaik this happens because the terminal itself reports it as it's own EDIT: just looked at |
@KlzXS @leovilok please see if this can be resolved easily (without forking and all... I guess this has to do with Otherwise I am fine with not fixing it and moving on. We can't keep forking as if we have unlimited resource. |
Why not simply use |
I guess you're right about ¹: well after calling |
@leovilok can you please raise the PR? I experimented with something similar and it didn't work with xfce4-terminal. Maybe I missed something. |
Ignore the earlier comment. Tested with kitty. Works fine. |
@Kratacoa please confirm that the patch works as expected for you. |
Nope, I'm afraid it doesn't work. |
The way I tested this is:
|
Yeah, my setup is pretty much the same. Cannot reproduce the correct behaviour. |
I just tested with |
My complete kitty config for reference:
|
For future reference. The equivalent in
|
Reopening as we had to revert the patch due to side-effects. Feel free to pitch in. |
We might want to reset the terminal process group on exit to what it was before. |
@leovilok in case you might not have noticed, please feel free to experiment with this. I did try what you suggested but it didn't work. Very much possible I made a mistake somewhere. |
@jarun I had noticed, but my interest was quite low, and I finally forgot about this. Note that I never tested anything in this issue, every suggestion I made came from the docs or other discussion I read on the web. But I'm still unsure about how/when |
No problem! I will leave it open. I assumed you have more clarity on this. |
This is open for a while and I don't see anyone picking it up. Closing the issue and adding a line item in the ToDo list for the same. |
@Kratacoa now we have a solution to get the |
We also suggested an easy solution for this here using OSC 7 but it wasn't preferred. |
Issue
When I navigate to a directory in nnn, exit it with ! and open another window with
launch --cwd=current
(which is the command forkitty
that allows to open a new window inside the previous directory), it opens inside home directory.Actually, after doing such an action, even if i cd outside, it keeps opening inside the home directory.
According to kitty's author, this is because
nnn
doesn't set the shell as the active process for the terminal device.Kitty uses the current directory of the active foreground child process associated with the terminal device in the active window.
Environment details (Put
x
in the checkbox along with the information)[x] Operating System: Void Linux, musl version
[ ] Desktop Environment:
[x] Terminal Emulator: kitty
[x] Shell: fish
[ ] Custom desktop opener (if applicable):
[x] Program options used: aeEnx
[ ] Configuration options set:
[x] Issue exists on
nnn
masterThe text was updated successfully, but these errors were encountered: