@@ -24,6 +24,7 @@ pub const MACOS_TERMINALS: &[Terminal] = &[
2424 Terminal :: CursorNightly ,
2525 Terminal :: Rio ,
2626 Terminal :: Windsurf ,
27+ Terminal :: Ghostty ,
2728] ;
2829
2930/// Terminals that Linux supports
@@ -138,6 +139,8 @@ pub enum Terminal {
138139 Zellij ,
139140 /// Windsurf
140141 Windsurf ,
142+ /// Ghostty
143+ Ghostty ,
141144}
142145
143146impl fmt:: Display for Terminal {
@@ -174,6 +177,7 @@ impl fmt::Display for Terminal {
174177 Terminal :: Rio => write ! ( f, "Rio" ) ,
175178 Terminal :: Windsurf => write ! ( f, "Windsurf" ) ,
176179 Terminal :: Guake => write ! ( f, "Guake" ) ,
180+ Terminal :: Ghostty => write ! ( f, "Ghostty" ) ,
177181 }
178182 }
179183}
@@ -333,6 +337,7 @@ impl Terminal {
333337 Terminal :: Rio => "rio" . into ( ) ,
334338 Terminal :: Windsurf => "windsurf" . into ( ) ,
335339 Terminal :: Guake => "guake" . into ( ) ,
340+ Terminal :: Ghostty => "ghostty" . into ( ) ,
336341 }
337342 }
338343
@@ -358,6 +363,7 @@ impl Terminal {
358363 Terminal :: CursorNightly => Some ( "com.todesktop.23052492jqa5xjo" . into ( ) ) ,
359364 Terminal :: Rio => Some ( "com.raphaelamorim.rio" . into ( ) ) ,
360365 Terminal :: Windsurf => Some ( "com.exafunction.windsurf" . into ( ) ) ,
366+ Terminal :: Ghostty => Some ( "com.mitchellh.ghostty" . into ( ) ) ,
361367 _ => None ,
362368 }
363369 }
@@ -381,7 +387,8 @@ impl Terminal {
381387 "com.todesktop.23052492jqa5xjo" => Terminal :: CursorNightly ,
382388 "com.raphaelamorim.rio" => Terminal :: Rio ,
383389 "com.exafunction.windsurf" => Terminal :: Windsurf ,
384- // todo(mschrage): the following line does not account for Android Studio
390+ "com.mitchellh.ghostty" => Terminal :: Ghostty ,
391+ // TODO: the following line does not account for Android Studio
385392 _ if bundle. starts_with ( "com.jetbrains." ) | bundle. starts_with ( "com.google." ) => {
386393 Terminal :: IntelliJ ( IntelliJVariant :: from_bundle_id ( bundle) )
387394 } ,
@@ -401,6 +408,7 @@ impl Terminal {
401408 | Terminal :: IntelliJ ( _)
402409 | Terminal :: Zed
403410 | Terminal :: Rio
411+ | Terminal :: Ghostty
404412 )
405413 }
406414
@@ -453,6 +461,7 @@ impl Terminal {
453461 Terminal :: Rio => & [ "rio" ] ,
454462 Terminal :: Windsurf => & [ "windsurf" ] ,
455463 Terminal :: Guake => & [ "guake" ] ,
464+ Terminal :: Ghostty => & [ "ghostty" ] ,
456465
457466 Terminal :: Ssh => & [ "sshd" ] ,
458467 Terminal :: Tmux => & [ "tmux" , "tmux: server" ] ,
0 commit comments