Skip to content

Align PowerShell's CLI / startup behavior with POSIX-like shells such as Bash - command-line arguments #3743

Closed

Description

This is a follow-up to #3600.

To make PowerShell fit into the world of POSIX-like shells on Unix platforms, so that it can be a viable alternative, it must:

  • support certain command-line parameters (options)
  • exhibit certain default behaviors on startup

The POSIX spec for the sh utility prescribes both.

Definitely not everything there is applicable to PowerShell, but I think it's important to at least fundamentally exhibit the same behavior and to document to what extent PowerShell is compliant.

A step has been made in the right direction by adding support for -i to start an interactive session - see #3558

More work is needed, some of which would result in breaking changes.

The list is not complete, but hopefully covers the most important aspects.

Current as of PowerShell 7.3.1

Activity

  1. iSazonov commented on May 9, 2017

    @iSazonov
    Collaborator

    If there are conflicts with keys we could use a wrapper to start PowerShell Core.

  2. added
    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassif
    Issue-Metaan issue used to track multiple issues
    on May 9, 2017
  3. added this to the milestone on May 9, 2017
  4. jpsnover commented on May 12, 2017

    @jpsnover
    Contributor

    Great feedback - thanks so much!

  5. modified the milestones: , , on May 15, 2017
  6. 7 remaining items

  7. added this to the milestone on Nov 11, 2017
  8. added
    Committee-ReviewedPS-Committee has reviewed this and made a decision
    and removed
    Review - CommitteeThe PR/Issue needs a review from the PowerShell Committee
    on Jan 3, 2018
  9. SteveL-MSFT commented on Jan 3, 2018

    @SteveL-MSFT
    Member

    @PowerShell/powershell-committee agrees that we should align with POSIX where it makes sense. It seems that many of the specific issues above have been addressed and we should evaluate each remaining ones separately without needing PS-Committee to review each one unless necessary

  10. mi-hol commented on Oct 30, 2019

    @mi-hol

    Steve Lee (@SteveL-MSFT) would it make sense to addressed the remaining open linked issues in version 7, when everybody expects a breaking change?

  11. SteveL-MSFT commented on Oct 31, 2019

    @SteveL-MSFT
    Member

    mi-hol even though we are going with a major version update, it doesn't imply we are making lots of breaking changes. In fact, we are trying to minimize breaking changes since 6.0 shipped. We've had to make some targeted ones, but in general we are defaulting to not breaking unless necessary. From the list above, it seems the main contention is whether $profile gets loaded by default or not. Although this annoys me personally as I forget to add -NoProfile, it seems to big of a breaking change to accept.

  12. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  13. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  14. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  15. microsoft-github-policy-service commented on Nov 23, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Breaking-Changebreaking change that may affect usersCommittee-ReviewedPS-Committee has reviewed this and made a decisionIssue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifIssue-Metaan issue used to track multiple issuesResolution-No ActivityIssue has had no activity for 6 months or more

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions