ion issueshttps://gitlab.redox-os.org/redox-os/ion/-/issues2021-06-01T11:13:04Zhttps://gitlab.redox-os.org/redox-os/ion/-/issues/994Scopes: can not change variables in function from matches, conditionals or loops2021-06-01T11:13:04Zmatu3baScopes: can not change variables in function from matches, conditionals or loopsbug: values in same function scope are not writable from matches, conditionals or loops.
Additionally, one can not write into variables of higher scope. We need to clarify the syntax for this.
expect: It should be possible to write valu...bug: values in same function scope are not writable from matches, conditionals or loops.
Additionally, one can not write into variables of higher scope. We need to clarify the syntax for this.
expect: It should be possible to write values in functions.
code: input
```sh
let x = 4
let y = 0
let z = 0
let a = 4
fn demo
if test 1 == 1
let x += 1
end
echo "x:" $x
if test $x != 5
echo "x broken"
end
for i in {0..=4}
let z += 1
end
echo "z:" $z
if test $z != 5
echo "z broken"
end
match $a
case 4; let a += 1
case _; echo "FAIL"
end
echo "a:" $a
if test $a != 5
echo "a broken"
end
#echo $y
#while test $y -lt 5
# let y += 1 # BROKEN: does not update y
# #echo $y
#end
#echo "y:" $y
#if test $y != 5
# echo "y broken"
#end
end
demo
echo $x
echo $y
echo $z
echo $a
```
actual: output
```txt
x: 4
x broken
z: 0
z broken
a: 4
a broken
4
0
0
4
```
expect: output
```txt
x: 5
y: 5
z: 5
a: 5
5
5
5
5
```
version: e033ca1c0c2ff8d1932137d2ed7354d003ad9cdc
interaction: noneIon Shell v1.0.0betamatu3bamatu3bahttps://gitlab.redox-os.org/redox-os/ion/-/issues/990Unterminated single quotes may run arbitrary commands2022-11-26T09:23:24Zmatu3baUnterminated single quotes may run arbitrary commandsbug: The shell does not create and error upon a wrong let binding with single quotes. It appears to run arbitrary commands, when further single quotes appear.
If you are lucky, it creates a core dump.
expect: Not silently accepting a wr...bug: The shell does not create and error upon a wrong let binding with single quotes. It appears to run arbitrary commands, when further single quotes appear.
If you are lucky, it creates a core dump.
expect: Not silently accepting a wrong grammar (for files). The REPL should also indicate, that the string is not terminated.
related: #959 #949
code: input
```sh
let a = 'ab''
```
expect: output
```
ion: syntax error: unterminated single quote
```
version: f05b74e7f3ba96a667a343cd07de212183757b8d
interaction: Alacritty with ion
context: terminal multiplexers may prevent faster core dumpIon Shell v1.0.0betamatu3bamatu3bahttps://gitlab.redox-os.org/redox-os/ion/-/issues/942bug: Panic when `[` is not closed.2022-11-26T09:23:25ZechoSayonarabug: Panic when `[` is not closed.When I tried to assign an array to a variable, I missed to close parenthesis and then `ion` panicked. I tried to reproduce this behavior and found that using `[` without `]` after `let foo =` cause panic. If I forget to close other paren...When I tried to assign an array to a variable, I missed to close parenthesis and then `ion` panicked. I tried to reproduce this behavior and found that using `[` without `]` after `let foo =` cause panic. If I forget to close other parenthesis, `ion` does not panic but only `[` just after `let foo =` cause panic. I append examples to reproduce the error.
```
let foo = ( // => syntax error
let foo = { // => syntax error
let foo = [ // => panic!
( // => syntax error
{ // => syntax error
[ // => syntax error
let boo = (1, 2, // => syntax error
let boo = {1, 2, // => syntax error
let boo = [1, 2, // => panic!
```Ion Shell v1.0.0betamatu3bamatu3bahttps://gitlab.redox-os.org/redox-os/ion/-/issues/914Missing end quote on export command generates weird errors2022-11-26T09:23:26ZSteven PeaseMissing end quote on export command generates weird errors```
export GEM_HOME="${HOME}/something
```
This can cause anywhere from `assignment error: GEM_HOME: variable does not exist` to `extra values were supplied, and thus ignored` depending on the following commands.
If this is intentional...```
export GEM_HOME="${HOME}/something
```
This can cause anywhere from `assignment error: GEM_HOME: variable does not exist` to `extra values were supplied, and thus ignored` depending on the following commands.
If this is intentional, I'm guessing the intention was to allow strings spanning newlines?
An error when there's an uneven number of quotation marks etc. would be nice to have.Ion Shell v1.0.0betamatu3bamatu3bahttps://gitlab.redox-os.org/redox-os/ion/-/issues/452Background Jobs That Request TTY Will Exit2021-01-06T22:41:58ZMichael Aaron Murphymmstick@pm.meBackground Jobs That Request TTY Will ExitJobs created as background jobs, which require access to a TTY, will immediately exit.Jobs created as background jobs, which require access to a TTY, will immediately exit.Ion Shell v1.0.0beta