Skip to content

Conversation

JohnTheGr8
Copy link
Member

Add Pwsh as a shell option. Powershell users would probably prefer to use Pwsh over the old (Windows) Powershell that ships with Windows.

This raises everyone's favorite problem: how to name each case to distinguish between v5 (Windows Powershell) and v7.x (Powershell (Core) or Pwsh). Thoughts welcome...

( changes partly picked from #1116 )

JohnTheGr8 and others added 2 commits June 12, 2023 15:49
enables us to add new `Shell` options without messing with the user's
saved settings, while keeping the `RunCommand` option last.
@JohnTheGr8 JohnTheGr8 added the enhancement New feature or request label Jun 12, 2023
@JohnTheGr8 JohnTheGr8 self-assigned this Jun 12, 2023
@github-actions
Copy link

@check-spelling-bot Report

🔴 Please review

See the 📂 files view or the 📜action log for details.

Unrecognized words (1)

pwsh

To accept ✔️ these unrecognized words as correct and remove the previously acknowledged and now absent words, run the following commands

... in a clone of the [email protected]:JohnTheGr8/Flow.Launcher.git repository
on the plugin_shell_support_pwsh branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' |
perl - 'https://github.com/Flow-Launcher/Flow.Launcher/actions/runs/5245606870/attempts/1'
Errors (1)

See the 📂 files view or the 📜action log for details.

❌ Errors Count
❌ check-file-path 1

See ❌ Event descriptions for more information.

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

@JamesNZL
Copy link
Contributor

JamesNZL commented Jun 13, 2023

yes please.

+1 for pwsh—imo, best to match what already exists (ie pwsh.exe for v7, vs powershell.exe for v5).

ETA: Alternatively, perhaps:

  • Windows PowerShell (v5)
  • PowerShell (v7)

@taooceros
Copy link
Member

Maybe let's also add an option to add custom shell? Other shell is also pretty good like nushell. One concern of this is that pwsh is not installed in windows by default. I think a textbox to customize shell might be better?

@JohnTheGr8
Copy link
Member Author

Maybe let's also add an option to add custom shell? Other shell is also pretty good like nushell.

Sure, but let's do that in a different PR. Could be added along with Windows Terminal support.

One concern of this is that pwsh is not installed in windows by default.

That's a good point... should we handle this or trust that the user knows not to pick Pwsh when it is not already installed?

I think a textbox to customize shell might be better?

Can't just do that, each shell has different CLI options for no-exit, passing the sub-command to execute, etc

@JohnTheGr8
Copy link
Member Author

I think a textbox to customize shell might be better?

Can't just do that, each shell has different CLI options for no-exit, passing the sub-command to execute, etc

to add to this: I think it would be best if we add Windows Terminal support and implement profile selection, as discussed in #1116. Then users can configure all their preferences from Terminal (what shell to use, etc) and Flow just uses that without complicating things on our end...

@JohnTheGr8 JohnTheGr8 added this to the 1.16.0 milestone Jun 25, 2023
@JohnTheGr8 JohnTheGr8 merged commit 2daed50 into Flow-Launcher:dev Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants