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

x == $x not evaluated #3

Closed
step- opened this issue Oct 23, 2017 · 1 comment
Closed

x == $x not evaluated #3

step- opened this issue Oct 23, 2017 · 1 comment
Assignees
Labels

Comments

@step-
Copy link
Owner

step- commented Oct 23, 2017

this menu file

x=2
x==echo x is $x
item=$x
cmd=true
x=3
y==echo x is $x
item=$y
cmd=true

displays as

echo x is 2         <-- should be "x = 2"
x is 3
@step- step- added the bug label Oct 23, 2017
@step- step- self-assigned this Oct 23, 2017
@step-
Copy link
Owner Author

step- commented Oct 23, 2017

Moreover, only trivial forms of sh -c are being evaluated. The following menu file evaluates just the first entry (date). Everything else is displayed as entered in the == RHS.

x==sh -c date    <-- this displays as date's output (correct)
item=$x
cmd=true
x==sh -c "date"   <-- this displays as `sh -c "date"`  (wrong), and so on...
item=$x
cmd=true
x==sh -c "echo 'c d'"
item=$x
cmd=true
x==sh -c "echo e f"
item=$x
cmd=true
x==sh -c "echo a"
item=$x
cmd=true
x==sh -c 'echo a'
item=$x
cmd=true
x==sh -c "printf prefix; date"
item=$x
cmd=true

step- added a commit that referenced this issue Oct 24, 2017
If the == LHS already existed the RHS wasn't evaluated.
Added test case files.
@step- step- closed this as completed Oct 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant