-
-
Notifications
You must be signed in to change notification settings - Fork 448
Fix one more whitespace after commands #3734
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.
🥷 Code experts: no user but you matched threshold 10 Jack251970 has most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame: To learn more about /:\ gitStream - Visit our Docs |
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
📝 WalkthroughWalkthroughThe changes refactor the Changes
Sequence Diagram(s)No sequence diagram generated as the changes are limited to code refactoring and do not alter control flow or introduce new features. Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (4)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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.
Pull Request Overview
This PR ensures no extra whitespace is added after commands when _settings.CloseShellAfterPress
is false by extracting the translated prompt into a variable and restructuring the command argument strings.
- Extract translation lookup into
notifyStr
to avoid repeated calls - Refactor command string concatenation to conditionally include the close-shell prompt without trailing spaces
- Simplify
ProcessStartInfo
instantiation usingvar
Comments suppressed due to low confidence (3)
Plugins/Flow.Launcher.Plugin.Shell/Main.cs:202
- [nitpick] The variable name
notifyStr
is ambiguous. Consider renaming it to something more descriptive, likecloseShellPrompt
orpausePrompt
, to improve readability.
var notifyStr = Context.API.GetTranslation("flowlauncher_plugin_cmd_press_any_key_to_close");
Plugins/Flow.Launcher.Plugin.Shell/Main.cs:217
- Consider adding unit tests for
PrepareProcessStartInfo()
to verify that whenCloseShellAfterPress
is false no extra whitespace appears after the command, and that the prompt is correctly included when true.
info.ArgumentList.Add(
Plugins/Flow.Launcher.Plugin.Shell/Main.cs:217
- The conditional suffix for
CloseShellAfterPress
is duplicated across multiple shell cases. Extract this logic into a helper method (e.g.,GetCloseShellSuffix()
) to reduce duplication and simplify future updates.
info.ArgumentList.Add(
@jjw24 Already tested by users. And please do the final check. |
@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 ...
|
Fix one more whitespace after commands
Do not add one more whitespace after commands when
_settings.CloseShellAfterPress
is false.Resolve #3673.