ion issueshttps://gitlab.redox-os.org/redox-os/ion/-/issues2020-12-17T00:12:58Zhttps://gitlab.redox-os.org/redox-os/ion/-/issues/898Document "Ctrl-c" (clears the line) vs Ctrl-D (clears the scope when typed at...2020-12-17T00:12:58ZngirardDocument "Ctrl-c" (clears the line) vs Ctrl-D (clears the scope when typed at an empty line)After typing ```fn a <return>```, ctrl-c doesn't work, and there's seemingly no way of escaping the REPL, except typing ```end <return>```.After typing ```fn a <return>```, ctrl-c doesn't work, and there's seemingly no way of escaping the REPL, except typing ```end <return>```.Ion Shell v1.0.0betahttps://gitlab.redox-os.org/redox-os/ion/-/issues/886Replace method does not consider strings of zero length to be an input2021-03-18T17:21:54ZMichael Aaron Murphymmstick@pm.meReplace method does not consider strings of zero length to be an inputThis currently gives an error about needing an extra argument
```
echo $replace("foobar" "bar" "")
```This currently gives an error about needing an extra argument
```
echo $replace("foobar" "bar" "")
```Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/881Maps: Assignment does only type check against `str`2021-01-12T16:16:14ZRoland KovácsMaps: Assignment does only type check against `str`* ion revision: 04f7be9
* expected behavior: map assignments are validated against the value type
```
$ let hm:hmap[int] = [ 'a'=0 ]
$ let hm['a'] += 1
ion: assignment error: type error: variable `hm` of type `str` does not support oper...* ion revision: 04f7be9
* expected behavior: map assignments are validated against the value type
```
$ let hm:hmap[int] = [ 'a'=0 ]
$ let hm['a'] += 1
ion: assignment error: type error: variable `hm` of type `str` does not support operator
```
The bug persist for `float` and `int` values types for both `hmap[]` and `bmap[]`.Ion Shell v1.0.0betahttps://gitlab.redox-os.org/redox-os/ion/-/issues/880Multiple LHS values with indexing using math assignment operates on entire array2020-12-12T23:10:27ZRoland KovácsMultiple LHS values with indexing using math assignment operates on entire array* ion revision: 04f7be9
* expected behavior: indexed assignment only applies to the index position.
```
$ let a:[int] = [0 0 0]
$ let b:int = 0
$ let a[1] b += 1 1
$ echo @a
1 1 1 # [0 1 0] expected
$ echo $b
1
```* ion revision: 04f7be9
* expected behavior: indexed assignment only applies to the index position.
```
$ let a:[int] = [0 0 0]
$ let b:int = 0
$ let a[1] b += 1 1
$ echo @a
1 1 1 # [0 1 0] expected
$ echo $b
1
```Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/877Is ion language embeddable into Rust?2020-12-12T23:02:21ZDieter KonradIs ion language embeddable into Rust?Like lua in c?Like lua in c?Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/869Slice syntax doesn't work immediately following a function2020-12-12T23:12:04ZTom AlmeidaSlice syntax doesn't work immediately following a functionI think this is actually related to #868 and probably explains it.
If you have a method that should generate an array and then immediately follow it by a slice pattern, then the slice pattern isn't generated, whereas if you surround the...I think this is actually related to #868 and probably explains it.
If you have a method that should generate an array and then immediately follow it by a slice pattern, then the slice pattern isn't generated, whereas if you surround the method by `[]`, then it works as intended.
```bash
tommoa:~# let multiline = "one
two
three
four"
tommoa:~# for line in @lines($multiline)[..2]
echo $line
end
one
two
three
four
tommoa:~# let second = @lines($multiline)[..2]
tommoa:~# echo $second
one two three four
tommoa:~# for line in [@lines($multiline)][..2]
echo $line
end
one
two
tommoa:~# let second = [@lines($multiline)][..2]
tommoa:~# echo $second
one two
```Ion Shell v1.0.0betahttps://gitlab.redox-os.org/redox-os/ion/-/issues/868For-loop expansion gobbles the end of the line2021-01-07T02:50:24ZAdminXVIIFor-loop expansion gobbles the end of the line`for a in @split("a b c"); echo $a; end` hangs, waiting for an extra end statement.`for a in @split("a b c"); echo $a; end` hangs, waiting for an extra end statement.Ion Shell v1.0.0betamatu3bamatu3bahttps://gitlab.redox-os.org/redox-os/ion/-/issues/866Arbitrary character for array expansion2020-12-12T23:04:37ZAdminXVIIArbitrary character for array expansionThe `@split($(command) "\n")` syntax is too verbose for expansion, and is quite common.
It would be better if Ion had a shorthand notation.
~~Proposition: `@"\n"(command)`, where "\n" can be any arbitrary separator.~~
This could cause c...The `@split($(command) "\n")` syntax is too verbose for expansion, and is quite common.
It would be better if Ion had a shorthand notation.
~~Proposition: `@"\n"(command)`, where "\n" can be any arbitrary separator.~~
This could cause confusion with methods, where `@join(command)` and `@"join"(command)` behave fairly differently. Further more, this would not allow expansion and/or would make it awkward (ex: `@"$var"(command)`)unplannedhttps://gitlab.redox-os.org/redox-os/ion/-/issues/857Tracking Issue: Fast math roadmap2021-06-01T11:49:38ZAdminXVIITracking Issue: Fast math roadmapMath is currently too slow. Proposed roadmap:
- [x] Default to integer, rather than float
- [ ] Store the types, rather than parsing back and forth
- [x] Use lexical for parsing, rather than the stdlibMath is currently too slow. Proposed roadmap:
- [x] Default to integer, rather than float
- [ ] Store the types, rather than parsing back and forth
- [x] Use lexical for parsing, rather than the stdlibIon Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/845Better word by word navigation2021-06-01T11:48:56ZDEVELOPER43Better word by word navigationWhen using `Alt+f` and `Alt+b` for word by word navigation, ion does not detect that special characters are not a part of words. also I think that `Ctrl + Left` for moving the cursor left word by word and `Ctrl + Right` for moving the cu...When using `Alt+f` and `Alt+b` for word by word navigation, ion does not detect that special characters are not a part of words. also I think that `Ctrl + Left` for moving the cursor left word by word and `Ctrl + Right` for moving the cursor right word by word is more ergonomic/supplementary than the current `Alt + b/f`Ion Shell v1.0.0betahttps://gitlab.redox-os.org/redox-os/ion/-/issues/834Cannot write functions with variable argument count2023-01-31T05:35:01ZZach ButtonCannot write functions with variable argument countIt appears to only be possible to define functions with a fixed number of arguments.
Perhaps the simplest solution would be some basic polymorphism. Example:
```shell
fn doStuff a b
echo a: $a, b: $b
end
fn doStuff a
doStuff $a "not...It appears to only be possible to define functions with a fixed number of arguments.
Perhaps the simplest solution would be some basic polymorphism. Example:
```shell
fn doStuff a b
echo a: $a, b: $b
end
fn doStuff a
doStuff $a "not_specified"
end
doStuff "test"
# "a: test, b: not_specified"
```
Or, perhaps cleaner, argument expansion:
```shell
fn printSection label ...list
echo -e "\n\n$label:"
for item in @list
echo "- $item"
end
end
printSection todo "type foo" "make bar"
# todo:
# - type foo
# - make bar
```unplannedhttps://gitlab.redox-os.org/redox-os/ion/-/issues/828Process hang with subshell2019-02-09T00:07:39ZMichael Aaron Murphymmstick@pm.meProcess hang with subshellStumbled across an issue that can cause ion to hang:
```
for src in src crates/*; echo $(echo -e "### $src\n ```\n$(tokei $src)\n```"); end
```
It doesn't always happen, but this will usually happen after the second attempt.Stumbled across an issue that can cause ion to hang:
```
for src in src crates/*; echo $(echo -e "### $src\n ```\n$(tokei $src)\n```"); end
```
It doesn't always happen, but this will usually happen after the second attempt.Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/827Syntax validation bug2021-01-08T00:17:27ZMichael Aaron Murphymmstick@pm.meSyntax validation bugManaged to make ion reach some unreachable code:
```
echo "$(echo -e "### src\n ```\n$(tokei src)\n```")"
```
It will only happen if the subshell is double-quoted.Managed to make ion reach some unreachable code:
```
echo "$(echo -e "### src\n ```\n$(tokei src)\n```")"
```
It will only happen if the subshell is double-quoted.Ion Shell v1.0.0betaAdminXVIIAdminXVIIhttps://gitlab.redox-os.org/redox-os/ion/-/issues/805Easy substring removal2023-03-10T13:53:44ZColeman McFarlandEasy substring removalI want to use ion to parse a config that looks like this, where the unique name given before the underscore `_`
is treated as part of a set.
```sh
HOST1_USERFILE=cloud-config/one.yml
HOST1_OS=ubuntu_18_04
HOST1_FACILITY=sjc1
HOST2_USE...I want to use ion to parse a config that looks like this, where the unique name given before the underscore `_`
is treated as part of a set.
```sh
HOST1_USERFILE=cloud-config/one.yml
HOST1_OS=ubuntu_18_04
HOST1_FACILITY=sjc1
HOST2_USERFILE=cloud-config/two.yml
HOST2_OS=ubuntu_18_04
HOST2_FACILITY=sjc1
```
I am using hashmap as a set. The following doesn't _quite_ work, because the "" empty string is not treated as an argument to `@replace`.
```
let hosts:hmap[] = [ ]
let name = $replace("HOST1_USERFILE", "_USERFILE" "")
let hosts[$name] = $name
```
I could do use a space instead of empty string:
```
let name = $replace("HOST1_USERFILE", "_USERFILE" " ") # a space, inst
```
... but the space is preserved in the value of `$name`.
I could use trim #802 when it lands, but a dedicated substring removal method might be nice.Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/803Methods for hmap and bmap handling2021-06-01T12:30:15ZRoland KovácsMethods for hmap and bmap handlingAdd support for getting keys or key-value pairs from maps, as currently only values can be extracted.
```
@keys(map)
@entries(map)
```Add support for getting keys or key-value pairs from maps, as currently only values can be extracted.
```
@keys(map)
@entries(map)
```Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/779Tracking Issue: Supported Types For Type-Checking2021-06-01T12:00:24ZMichael Aaron Murphymmstick@pm.meTracking Issue: Supported Types For Type-CheckingWe should evaluate and expand upon our current set of supported types. Here's a basic set of what we could support:
- **[T]**: an array of like-values
- **str**: a string -- the default type
- **bool**: either `1` or `0`
- **float**: a ...We should evaluate and expand upon our current set of supported types. Here's a basic set of what we could support:
- **[T]**: an array of like-values
- **str**: a string -- the default type
- **bool**: either `1` or `0`
- **float**: a generic decimal of any size
- **int**: a generic integer of any size, which may be negative
- **i32**: 32-bit int
- **i64**: 64-bit int
- **i128**: 128-bit int
- **uint**: a generic integer of any size, which may not be negative
- **u32**: 32-bit uint
- **u64**: 64-bit uint
- **u128**: 128-bit uintIon Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/772Create Benchmark Tests2021-06-01T13:01:05ZAlex MortonCreate Benchmark TestsIon could benefit from benchmark tests to help profile PRs that may impact performance: https://doc.rust-lang.org/1.7.0/book/benchmark-tests.html.
We can benchmark at a couple different levels here. One suggestion is to benchmark all sc...Ion could benefit from benchmark tests to help profile PRs that may impact performance: https://doc.rust-lang.org/1.7.0/book/benchmark-tests.html.
We can benchmark at a couple different levels here. One suggestion is to benchmark all scripts in the examples directory. We can also have benchmarks for lower-level units to test individual algorithms.Ion Shell v1.0.0betahttps://gitlab.redox-os.org/redox-os/ion/-/issues/705Add `type`-builtin instead of `which`2021-06-01T13:57:01ZMichael Aaron Murphymmstick@pm.meAdd `type`-builtin instead of `which`*Created by: LeonardKoenig*
**Description**: `which` is a remnant of csh and behaves on many shells differently, `type` has since replaced it as a portable and standardized alternative, cf. https://unix.stackexchange.com/questions/85249...*Created by: LeonardKoenig*
**Description**: `which` is a remnant of csh and behaves on many shells differently, `type` has since replaced it as a portable and standardized alternative, cf. https://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use-then
**Proposed change**: Add `type` shell-builtin, possibly deprecate/remove `which`.Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/582Improve status Builtin2021-06-01T12:47:38ZMichael Aaron Murphymmstick@pm.meImprove status BuiltinStatus: https://fishshell.com/docs/current/commands.html#status
Might be useful to have similar feature-parity within the Ion shell.Status: https://fishshell.com/docs/current/commands.html#status
Might be useful to have similar feature-parity within the Ion shell.unplannedhttps://gitlab.redox-os.org/redox-os/ion/-/issues/531Create a JobSplitter to Increase Flexibility of Statement Parsing2021-06-01T11:38:10ZMichael Aaron Murphymmstick@pm.meCreate a JobSplitter to Increase Flexibility of Statement ParsingWe are currently limited when processing commands like the following:
```
true && let a = 5
```
What happens is that the entire pipeline is considered as a command, and each job in the pipeline is executed as a command. Let is not a co...We are currently limited when processing commands like the following:
```
true && let a = 5
```
What happens is that the entire pipeline is considered as a command, and each job in the pipeline is executed as a command. Let is not a command though, so this will fail. This would require some more advanced restructuring, though, so it won't be easy. We'd have to add a job splitter to split statements into jobs, and make a number of possible changes within pipeline execution to account for jobs possibly being keywords.unplanned