Skip to content
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

Environment variable expansion echo $HOME #56

Closed
Tracked by #2
superxcgm opened this issue Sep 19, 2021 · 1 comment
Closed
Tracked by #2

Environment variable expansion echo $HOME #56

superxcgm opened this issue Sep 19, 2021 · 1 comment
Assignees

Comments

@superxcgm
Copy link
Owner

superxcgm commented Sep 19, 2021

Epic

Process

Description

For good user experience, user can add chain commands using pipeline

AC

  1. Plain $ENV with value
    Given: Environment variable XXX exist (For example: $HOME)
    When: User type echo $XXX, and hit <enter>
    Then: shell should replace $XXX with it's value, and pass this argument to command echo.

  2. Plain $ENV with no value
    Given: Environment variable XXX not exist (For example: $haha)
    When: User type echo $XXX, and hit <enter>
    Then: shell should replace $XXX with empty string, and pass this argument to command echo.

  3. $ENV enclose with single quotation marks
    Given: No matter environment XXX exist or not.
    When: User type echo '$XXX', and hit <enter>
    Then: shell should not replace $XXX with anything, and pass $XXX as argument to command echo.

  4. $ENV enclose with double quotation marks
    Given: Environment variable XXX exist (For example: $HOME), and environment variable YYY not exist.
    When: User type echo "$XXX $YYY", and hit <enter>
    Then: shell should replace $XXX with it's value, and replace $YYY with empty string, and pas argument {some value} to command echo.

@superxcgm superxcgm mentioned this issue Sep 19, 2021
32 tasks
@superxcgm superxcgm changed the title User input support environment variable expansion echo $HOME Environment variable expansion echo $HOME Sep 19, 2021
superxcgm added a commit that referenced this issue Nov 2, 2021
support environment variable expansion
@superxcgm
Copy link
Owner Author

QA

  1. Plain $ENV with value
    Given: Environment variable XXX exist (For example: $HOME)
    When: User type echo $XXX, and hit <enter>
    Then: ✅shell should replace $XXX with it's value, and pass this argument to command echo.

  2. Plain $ENV with no value
    Given: Environment variable XXX not exist (For example: $haha)
    When: User type echo $XXX, and hit <enter>
    Then: ✅shell should replace $XXX with empty string, and pass this argument to command echo.

  3. $ENV enclose with single quotation marks
    Given: No matter environment XXX exist or not.
    When: User type echo '$XXX', and hit <enter>
    Then: ✅shell should not replace $XXX with anything, and pass $XXX as argument to command echo.

  4. $ENV enclose with double quotation marks
    Given: Environment variable XXX exist (For example: $HOME), and environment variable YYY not exist.
    When: User type echo "$XXX $YYY", and hit <enter>
    Then: ✅shell should replace $XXX with it's value, and replace $YYY with empty string, and pas argument {some value} to command echo.

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

No branches or pull requests

2 participants