Ji4n1ng / OpenInTerminal

✨ Finder Toolbar app for macOS to open the current directory in Terminal, iTerm, Hyper or Alacritty.
MIT License
5.88k stars 235 forks source link

Support for Warp #173

Closed TopAlien closed 8 months ago

TopAlien commented 2 years ago

https://www.warp.dev/

oncealong commented 2 years ago

I tried "defaults write wang.jianing.app.OpenInTerminal-Lite LiteDefaultTerminal Warp", OpenInTerminal-Lite can open Warp, but it doesn't support "Open in current directory", Warp always open the path when it last closed. I have no idea it is a bug of OpenInTerminal or Warp.

Cubik65536 commented 2 years ago

I tried "defaults write wang.jianing.app.OpenInTerminal-Lite LiteDefaultTerminal Warp", OpenInTerminal-Lite can open Warp, but it doesn't support "Open in current directory", Warp always open the path when it last closed. I have no idea it is a bug of OpenInTerminal or Warp.

This is not a bug but a feature that needs to be implemented on both sides of Warp and OpenInTerminal.

OpenInTerminal uses an open -a terminal command to open the "not officially supported" terminals^1. But an ./path/to/directory argument needs to be added to the command so the terminal would open in the wanted directory. And it will not work instantly because for now, Warp does not support the use of the ./path/to/directory argument to launch the terminal with the directory open. (https://github.com/warpdotdev/Warp/discussions/612)

Cubik65536 commented 2 years ago

/cc @Ji4n1ng

In a documentation of Warp, they said that the "Open in IDE" feature is implemented, and it is working. But I could not figure out how VSCode starts up a new terminal. So maybe this should be checked.

P.S. This function is NOT always working, sometimes Warp still starts up on the working directory, sometimes ~. By comparison, iTerm starts always on the working directory. P.P.S. I cannot get it to work with JetBrains IDEs (IntelliJ IDEA).


Update: I'm trying to get some help about the problem above from the Warp team and I did not receive a response yet. I will update this again after I got an answer about what is happening with this feature.

molvqingtai commented 1 year ago

I use "defaults write wang.jianing.app.OpenInTerminal-Lite LiteDefaultTerminal warp" to work normally.

vnl commented 1 year ago

@molvqingtai This worked partially for me, as, It opens two instances. One in root and the other in the current directory as it should.

davay commented 11 months ago

2 weeks ago Warp added public URIs warpdotdev/Warp#612, might take a crack at it

bc-m commented 10 months ago

Workaround

Add this line to your .zshrc' or.bashrc' file, after the lines starting with export PATH:

[ "$TERM_PROGRAM" "==" "Apple_Terminal" ] && open -a Warp.app . && killall Terminal
Ji4n1ng commented 8 months ago

This is supported in v2.3.7.

jd-solanki commented 6 months ago

@molvqingtai Thanks for the config command. I have one following issue, It opens warp new session in existing window as a new tab. How can I tell it to open new window instead? This is because I use multiple spaces on mac and when I open warp from space 1 and my another warp is open in space 3 then it redirects me to space 3 upon click.

insolor commented 5 months ago

It seems that Warp is still not supported by the -lite version, although README says otherwise