-
-
Notifications
You must be signed in to change notification settings - Fork 456
Add Windows Terminal to Shell Plugins #3225
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
Conversation
This comment has been minimized.
This comment has been minimized.
📝 WalkthroughWalkthroughThe changes introduce a new property Changes
Suggested labels
Suggested reviewers
Poem
Tip 🌐 Web search-backed reviews and chat
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (1)
Plugins/Flow.Launcher.Plugin.Shell/Main.cs (1)
282-308: Implementation looks good but needs additional error handling.The Windows Terminal integration is well-implemented, following proper command-line conventions for both PowerShell and CMD scenarios.
Consider these improvements:
- Verify wt.exe existence before execution
- Add specific error handling for Windows Terminal scenarios
Add this verification before the Windows Terminal cases:
case Shell.TerminalPWSH: { + if (!ExistInPath("wt.exe")) + { + throw new FileNotFoundException("Windows Terminal (wt.exe) is not installed."); + } info.FileName = "wt.exe"; // ... rest of the code } case Shell.TerminalCMD: { + if (!ExistInPath("wt.exe")) + { + throw new FileNotFoundException("Windows Terminal (wt.exe) is not installed."); + } info.FileName = "wt.exe"; // ... rest of the code }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
Plugins/Flow.Launcher.Plugin.Shell/Main.cs(1 hunks)Plugins/Flow.Launcher.Plugin.Shell/Settings.cs(1 hunks)Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml(1 hunks)Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml.cs(2 hunks)
👮 Files not reviewed due to content moderation or server errors (4)
- Plugins/Flow.Launcher.Plugin.Shell/Settings.cs
- Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml
- Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml.cs
- Plugins/Flow.Launcher.Plugin.Shell/Main.cs
🔇 Additional comments (7)
Plugins/Flow.Launcher.Plugin.Shell/Settings.cs (3)
42-43: LGTM! Enum values are properly defined.The new enum values for Windows Terminal integration follow consistent naming patterns and are correctly sequenced.
42-43: LGTM! Enum values are well-defined.The new enum values for Windows Terminal integration follow consistent naming conventions and are properly ordered.
42-43: LGTM! Enum values are properly defined.The new shell types for Windows Terminal are correctly added with unique values and follow the existing naming convention.
Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml.cs (3)
94-95: LGTM! Selection logic is properly implemented.The selection handling for new Terminal options is correctly implemented and maintains consistency with existing shell options.
Also applies to: 106-107
94-95: LGTM! Selection logic properly handles new terminal options.The switch expressions are correctly updated to handle the new Windows Terminal options while maintaining existing functionality.
Also applies to: 106-107
94-95: LGTM! Selection logic is properly implemented.The selection handling for Windows Terminal options is correctly integrated in both the initial selection and change event handlers.
Also applies to: 106-107
Plugins/Flow.Launcher.Plugin.Shell/Main.cs (1)
282-308: Verify Windows Terminal command-line compatibility.Let's confirm the command-line argument syntax for Windows Terminal.
✅ Verification successful
🌐 Web query:
What are the supported command-line arguments for Windows Terminal?Length of output: 5531
Windows Terminal Command-Line Arguments Are Compatible
- The implementation uses
wt.exewith shell identifiers (pwshfor PowerShell andcmdfor Command Prompt), which is in line with Windows Terminal’s flexible argument parsing.- For PowerShell, using
-Commandwith an optional-NoExitflag (when leaving the shell open) matches PowerShell’s standard argument scheme.- For CMD, the use of
/c(to close after execution) and/k(to keep the shell open) is consistent with CMD’s typical behavior.- According to official documentation and external guides, Windows Terminal supports these patterns when launching specific shells.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
Plugins/Flow.Launcher.Plugin.Shell/Languages/en.xaml(2 hunks)Plugins/Flow.Launcher.Plugin.Shell/Languages/es-419.xaml(1 hunks)Plugins/Flow.Launcher.Plugin.Shell/Languages/es.xaml(1 hunks)Plugins/Flow.Launcher.Plugin.Shell/Main.cs(2 hunks)Plugins/Flow.Launcher.Plugin.Shell/Settings.cs(1 hunks)Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml(2 hunks)Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml.cs(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
- Plugins/Flow.Launcher.Plugin.Shell/Settings.cs
- Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml.cs
- Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml
- Plugins/Flow.Launcher.Plugin.Shell/Main.cs
🔇 Additional comments (2)
Plugins/Flow.Launcher.Plugin.Shell/Languages/es-419.xaml (1)
9-9: LGTM!The translation is accurate and the resource key is consistent with other Spanish language files.
Plugins/Flow.Launcher.Plugin.Shell/Languages/es.xaml (1)
9-9: LGTM!The translation is accurate and the resource key is consistent with other Spanish language files.
This comment has been minimized.
This comment has been minimized.
|
Reverted the translation files as asked |
|
Looks like a better solution! Thanks |
This comment has been minimized.
This comment has been minimized.
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.
See ❌ Event descriptions for more information. If the flagged items are 🤯 false positivesIf items relate to a ...
|
|
Thanks for bring this feature! |

Hi!
I left a comment couple of comments on #2045, but I decided to add the changes myself in my own pull request since the original one was rather old
I've never worked in a C# or windows project before, so please excuse if I messed something up in the process
I've built it and it seems to just work, which is a win in my books.
Hope it helps!
It is a much simpler fix compared to #1116, but it gets the job done