raycast / extensions

Everything you need to extend Raycast.
https://developers.raycast.com
MIT License
5.03k stars 2.76k forks source link

[Alacritty] "Edit File in Alacritty" fails #12052

Closed kfernandez31 closed 6 hours ago

kfernandez31 commented 2 months ago

Extension

https://www.raycast.com/jose-elias-alvarez/alacritty

Description

The command fails, doesn't open a file as intended. My $EDITOR is set to nvim by the way.

Steps To Reproduce

Run "Edit File in Alacritty"

Current Behaviour

Error
2024-04-28 09:24:35.200
alacritty[35243:40346299] WARNING: Secure
coding is not enabled for restorable state!
Enable secure coding by implementing NSA...

Expected Behaviour

The file should be opened in $EDITOR within an Alacritty window.

raycastbot commented 2 months ago

Thank you for opening this issue!

🔔 @jose-elias-alvarez you might want to have a look.

💡 Author and Contributors commands The author and contributors of `jose-elias-alvarez/alacritty` can trigger bot actions by commenting: - `@raycastbot close this issue` Closes the issue. - `@raycastbot rename this issue to "Awesome new title"` Renames the issue. - `@raycastbot reopen this issue` Reopens the issue. - `@raycastbot assign me` Assigns yourself to the issue. - `@raycastbot good first issue` Adds the "Good first issue" label to the issue.
kfernandez31 commented 2 months ago

Note: the same Error/Warning appears for the Open Folder in Alacritty command as well.

kfernandez31 commented 2 months ago

Also, any reason the shell opened is not a login one?

hoschi commented 2 months ago

I have also problems with these actions. In my case it says it can't execute fzf in my .zshrc which works fine when not Alacritty isn't spawned by this extension.

kfernandez31 commented 2 months ago

I have also problems with these actions. In my case it says it can't execute fzf in my .zshrc which works fine when not Alacritty isn't spawned by this extension.

iirc this is due to the shell spawned being a non-login interactive one, so it doesn't source your .zprofile in which a setup for fzf and others is located. Try moving that setup (probably some evals) to .zshrc or in .zshrc make sure you source .zprofile.

Jihillestad commented 2 months ago

I am affected by the same bug. Both ~/.zshrc and ~/.zprofile are sourced anbd have this line:

export EDITOR="/opt/homebrew/bin/nvim"
jose-elias-alvarez commented 2 months ago

I mentioned this in another issue, but I'm afraid that I'm no longer using Alacritty and so will not be able to work on this myself but am happy to provide guidance if needed for anyone who wants to put in a fix.

I recall that there was some reason why I couldn't just use a login shell (Alacritty isn't a great macOS citizen) but it might be worth looking into, since that seems like it would solve this issue.

raycastbot commented 1 week ago

This issue has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 10 days to keep our backlog clean 😊

raycastbot commented 6 hours ago

This issue has been automatically closed due to inactivity.

Feel free to comment in the thread when you're ready to continue working on it 🙂

You can also catch us in Slack if you want to discuss this.