-
-
Notifications
You must be signed in to change notification settings - Fork 844
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
pane:get_foreground_process_name() don't return actual foreground process #1898
Comments
I can't reproduce this. I wonder if this might be something weird with nushell? |
Can you try to zero in on a repro scenario? |
This issue happened both with zsh & nutshell. Nutshell have default configuration. What do you mean by zero in reproduction scenario? Thank you |
What are the minimum number of steps to deterministically make the problem happen? This is the config I tried; this shows the process in the right status (which only updates ~1 every second), and redefines the key assignment to log the process name. Even quickly starting and exiting vim had it producing the correct results. I made it run bash without running any rc files in order to isolate it from any config that might be in my shell rcfiles. local wezterm = require 'wezterm'
function basename(s)
return string.gsub(s, "(.*[/\\])(.*)", "%2")
end
wezterm.on("update-right-status", function(window, pane)
window:set_right_status(basename(pane:get_foreground_process_name()))
end)
return {
default_prog = {"bash", "--norc"},
keys = {
{ key='h', mods="CTRL", action=wezterm.action_callback(function(win, pane)
wezterm.log_info("is_vim", pane:get_foreground_process_name())
end) },
}
} |
Weird, for some reason whenever use Have you tried from Thank you edit: Launching Feel free to close this issue. Thank you |
@kuntau I've been trying to figure this out for months. Have you had any luck? I opened this issue with nushell: nushell/nushell#5050 One thing I wanted to do is exactly what you are trying to do above, make mappings that navigate vim panes if in vim, otherwise wez panes. But another much more frustrating side effect of this problem or maybe some other problem is that opening new panes does not open in the current pane directory if you start wezterm with |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
What Operating System(s) are you seeing this problem on?
macOS
WezTerm version
wezterm 20220419-232436-924b63eb
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
I had this issue for couple of month actually and I'm not sure how to debug it.
Wezterm
just detect my shell as foreground process as shown in log/usr/local/bin/zsh
or/usr/local/bin/nu
even I havevim
,htop
,ping
or any other process running.I tried setting
default_prog
to different shell to no availTo Reproduce
I'm not sure to how reproduce it but here's my full config
Nothing out of ordinary config
Configuration
Expected Behavior
Wezterm should detect
vim/nvim
is the foreground processLogs
This log is the output when I actually have other process running on top of shell
Anything else?
No response
The text was updated successfully, but these errors were encountered: