Skip to content

Parameter expansion of default values is not following POSIX #19

Description

@D-Brox

The syntax ${variable:default} is not one of the 8 valid cases described on the POSIX specifications:

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02

Activity

  1. de-vri-es commented on May 24, 2024

    @de-vri-es
    Contributor

    That's true. This crate is "shell-like" substitution. It does not aim to be POSIX compatible.

  2. D-Brox commented on May 24, 2024

    @D-Brox
    ContributorAuthor

    True, it's shell-like, but it would still be desirable if at least ${variable:-default} was also valid.

  3. de-vri-es commented on May 24, 2024

    @de-vri-es
    Contributor

    I'm sorry, but this has never been a goal of the library. Being compatible with POSIX is much more complicated than what this crate aims to be.

  4. D-Brox commented on May 24, 2024

    @D-Brox
    ContributorAuthor

    No problem, I can work around this.

    Can you take a look at #18 later? It has both an enhancement (permissive and partial substitution modes) and a fix for nested substitutions.

  5. de-vri-es commented on May 24, 2024

    @de-vri-es
    Contributor

    Yeah. I've been busy in a move lately, but I will try to get to it :)

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions