Skip to content
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

Adding $EDITOR check for open #4977

Closed

Conversation

ScriptAlchemist
Copy link

@ScriptAlchemist ScriptAlchemist commented Jan 12, 2025

Allowing for users to set the $EDITOR variable and use it to open a file instead of the default. I don't know zig and I'm testing this out. I just wanted to allow others to look at it as well.

This should solve #2504

Still figuring out the builds at the moment to really test out better

Allowing for users to set the $EDITOR variable and use it to open a file instead of the default on mac
@xzbdmw
Copy link

xzbdmw commented Jan 12, 2025

Hi, does this pr open $EDITOR in another ghostty window?

@ScriptAlchemist
Copy link
Author

ScriptAlchemist commented Jan 12, 2025

Hi, does this pr open $EDITOR in another ghostty window?

I believe that it's like running nvim ./filepath.txt so it would be in the current buffer screen

I have not successfully built this on mac. I'm not trying that hard on the weekend. It failed when I tried. I'm posting this to make it public

@ScriptAlchemist
Copy link
Author

Until I fix the build this does not work

@xzbdmw
Copy link

xzbdmw commented Jan 12, 2025

I'll suggest opening a new window and run $EDITOR there, because the current shell may have running process ;)

@jcollie
Copy link
Collaborator

jcollie commented Jan 12, 2025

This is the wrong approach to opening up a new Ghostty window and running $EDITOR $config. I realize that this is something that people really want but this really needs to wait for some of the API work for this to work properly.

@ScriptAlchemist
Copy link
Author

ScriptAlchemist commented Jan 12, 2025

This is the wrong approach to opening up a new Ghostty window and running $EDITOR $config. I realize that this is something that people really want but this really needs to wait for some of the API work for this to work properly.

Okay, @jcollie then just close this pr out. It doesn't even build right now. So obviously this isn't the correct method. I don't know zig and I haven't spend enough time to figure it out. Well enough apparently.

I just found the file that does the thing I want. Then was going to add the feature that I wanted. Instead of just complaining, but figured having it more public here would give me better insight.

I really just want it to open in place like everything else that works in the terminal. But I do understand the want for a new window

@ScriptAlchemist ScriptAlchemist deleted the default_editor branch January 17, 2025 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants