-
Notifications
You must be signed in to change notification settings - Fork 9
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
Open in a terminal editor despite the GUI passthrough #18
Comments
There are always hacks I guess! hammerspoon, |
Does the app actually know who called it (to be able to ask that terminal to open the file in a term editor)? Or the OS "erases" that info and the GUI wrapper is only aware of the arguments? In this case I guess you wouldn't be able to know exactly which terminal to request to open in, and I guess it should be done via the terminal by somehow registering another url scheme that'd open a file in a cli app instead of a gui app |
FYI I've added a tip on how to set a custom handler within WezTerm terminal itself wezterm/wezterm#3261, which opens a new tab with the path:ln:col in a given editor Otherwise I'm not sure it's possible to do it universally precisely because the GUI app is not aware of who called it, so not sure there is anything you can do (but if someone has a better idea, you're welcome to share it!, as far as I understood |
One concern I have is that the shell prompt may not be available -- e.g. the link may be displayed by a pager process which is still running -- in which case even if we're opening in a terminal-based editor, we'd have to spawn a new terminal window or something to do so. |
yeah, good point, has bumped into it, changed to always launch in a new tab just like a GUI editor would (would also remove the need to worry about existing text in the command line) |
By the way, maybe we could ask the user to setenv another variable |
I see there's already a PR here, but thought it might be worth posting a thing I put together that accomplishes the same(?) result. In my particular case, this was built to deal with the fact that Neovim doesn't spawn its own terminal (so when |
I've noticed that clicking on a link with terminal editor set as $EDITOR doesn't launch it (e.g., vim complains that
Vim: Warning: Output is not to a terminal Vim: Warning: Input is not from a terminal
)I guess this is due to the fact that the click invokes the GUI bundle app as a passthrough entity
Is there some hack to make the original terminal run the command despite the GUI wrapper?
The text was updated successfully, but these errors were encountered: