ion issueshttps://gitlab.redox-os.org/redox-os/ion/-/issues2018-10-28T02:51:03Zhttps://gitlab.redox-os.org/redox-os/ion/-/issues/370Handle output without newline2018-10-28T02:51:03ZIan Douglas ScottHandle output without newline`echo -n test`, for example, doesn't show anything because the prompt overwrites it. Ion should handle this in some way.
Zsh handles this case fairly nicely (adds a newline, but also marks it to show that it was not newline terminated).`echo -n test`, for example, doesn't show anything because the prompt overwrites it. Ion should handle this in some way.
Zsh handles this case fairly nicely (adds a newline, but also marks it to show that it was not newline terminated).Ion Shell v1.0.0Michael Aaron Murphymmstick@pm.meMichael Aaron Murphymmstick@pm.mehttps://gitlab.redox-os.org/redox-os/ion/-/issues/416Better Builtin Help Documentation2020-04-22T01:00:30ZMichael Aaron Murphymmstick@pm.meBetter Builtin Help DocumentationCurrently, builtins have very basic one-line short descriptions, but what we need is to provide a complete manpage when help for a specific command is asked for.Currently, builtins have very basic one-line short descriptions, but what we need is to provide a complete manpage when help for a specific command is asked for.Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/457Implement Step By Ranges2019-04-02T15:43:30ZMichael Aaron Murphymmstick@pm.meImplement Step By RangesWe have inclusive ranges, and exclusive ranges, so now we need a means of specifying an optional stepping.
```ion
$ let array = 1 2 3 4 5 6 7 8 9 10
$ echo @array[0,2..10]
> 1 3 5 7 9
$ echo {0,3..10}
> 0 3 6 9
```We have inclusive ranges, and exclusive ranges, so now we need a means of specifying an optional stepping.
```ion
$ let array = 1 2 3 4 5 6 7 8 9 10
$ echo @array[0,2..10]
> 1 3 5 7 9
$ echo {0,3..10}
> 0 3 6 9
```Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/470Multi-Dimensional Arrays?2021-06-01T11:22:46ZMichael Aaron Murphymmstick@pm.meMulti-Dimensional Arrays?Current proposed syntax, which should take advantage of the typed assignments feature.
```ion
$ let md_array:[[str]] = [[one two three][four five six][seven eight nine]]
$ echo md_array[0]
> one two three
$ echo mod_array[0][0]
> one
``...Current proposed syntax, which should take advantage of the typed assignments feature.
```ion
$ let md_array:[[str]] = [[one two three][four five six][seven eight nine]]
$ echo md_array[0]
> one two three
$ echo mod_array[0][0]
> one
```
# Roadmap
1) [ ] Merge `Key` and `Primitive` types as a `Key` enum
2) [ ] Make a new enum which holds data (and possible recursive inner types) for each `Key` enum variant
3) [ ] Fix `shell::assignment` and other important modules to reflect changes
[Roadmap due to evolve as time progresses]Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/482Make distinction between value types within Ion2021-06-01T11:41:22ZMichael Aaron Murphymmstick@pm.meMake distinction between value types within Ion*Created by: huntergoldstein*
# Problem
Everything is, by default, an `Array` when expanding strings. For example, the expression
```
$(foo bar baz)
```
is supposed to expand to a string, but currently this expands to a one element arra...*Created by: huntergoldstein*
# Problem
Everything is, by default, an `Array` when expanding strings. For example, the expression
```
$(foo bar baz)
```
is supposed to expand to a string, but currently this expands to a one element array. There are plenty of other similar cases, for example `""` expanding to the empty array versus the empty string.
# Solution
Introduce a true value type, something like:
```
enum Value {
String(SmallString)
Array(SmallVec<Value>)
}
```
# Considerations
- Expressions such as `foo @bar`, where `bar = [0 1 2 ...]` currently expand to `foo 0 1 2 ...` with each element of `bar` becoming an argument to `foo` and `foo "@bar"` for passing `bar` itself as an argument.
- Perhaps we have explicit array passing here with `foo [@bar]`
- Typed function arguments: do we want to add `bool` and `int` types? Also see #480.Ion Shell v1.0.0Michael Aaron Murphymmstick@pm.meMichael Aaron Murphymmstick@pm.mehttps://gitlab.redox-os.org/redox-os/ion/-/issues/494support CDPATH2019-03-23T17:46:26ZMichael Aaron Murphymmstick@pm.mesupport CDPATH*Created by: aeosynth*
> The search path for the `cd` command. This is a colon-separated list of directories in which the shell looks for destination directories specified by the `cd` command. A sample value is ".:~:/usr".
as seen in...*Created by: aeosynth*
> The search path for the `cd` command. This is a colon-separated list of directories in which the shell looks for destination directories specified by the `cd` command. A sample value is ".:~:/usr".
as seen in bash, zsh, fish...Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/542calc builtin conflicts with commonly-used tool2019-07-22T21:13:58ZMichael Aaron Murphymmstick@pm.mecalc builtin conflicts with commonly-used tool*Created by: jbg*
**Reproduction**: Run `calc`
**Expected behavior**: The common "C-style arbitrary precision calculator" ([website](http://www.isthe.com/chongo/tech/comp/calc/)), distributed as a part of *NIX distributions since 199...*Created by: jbg*
**Reproduction**: Run `calc`
**Expected behavior**: The common "C-style arbitrary precision calculator" ([website](http://www.isthe.com/chongo/tech/comp/calc/)), distributed as a part of *NIX distributions since 1994, launches.
**Actual behavior**: Apparently my shell is hung, but in fact the shell builtin is waiting for input and does not respond to Ctrl-C.
Maybe I'm one of the last people still using the fantastic `calc` calculator, but I hope not. Please consider renaming your builtin, or if not, at least make it respond to Ctrl-C :)Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/546Implement Fork Keyword (#531 Required)2021-06-01T11:29:45ZMichael Aaron Murphymmstick@pm.meImplement Fork Keyword (#531 Required)Some may find a use for performing forks and redirecting their input/outputs. This can currently be done by creating functions, but perhaps an in-line syntax to emulate anonymous functions would also be desirable. Therefore, we should su...Some may find a use for performing forks and redirecting their input/outputs. This can currently be done by creating functions, but perhaps an in-line syntax to emulate anonymous functions would also be desirable. Therefore, we should support a fork syntax that states it's intent clearly. As such, this is my proposed syntax, with an example of how the fork could perform redirection:
```sh
cat FILE | fork
first_command args... | second_command
end >> LOG
```
The fork keyword could be collected and treated internally as a function, and re-use the existing code for executing functions, with a few minor changes. However, this cannot be implemented without first implementing #531 and #566.Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/566Control Flow Redirections?2020-12-12T23:48:33ZMichael Aaron Murphymmstick@pm.meControl Flow Redirections?Should control flow keywords be able to perform and work with redirections themselves?
```sh
for x in 1...10
echo $x
end > results.txt
```
And a theoretical `map` keyword that works similar to `for`, but reads from stdin:
```sh
ca...Should control flow keywords be able to perform and work with redirections themselves?
```sh
for x in 1...10
echo $x
end > results.txt
```
And a theoretical `map` keyword that works similar to `for`, but reads from stdin:
```sh
cat results.txt | map x
echo $x
end
```
And combined:
```sh
for x in 1...10
echo $x
end | filter x
ends-with 5 $x
end | map x
echo $x
end
```
```Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/592Exit On Error Should Have Configurable Callback2019-07-22T20:50:25ZMichael Aaron Murphymmstick@pm.meExit On Error Should Have Configurable CallbackThose using Ion as a library should be able to choose the behavior that will enact when this conditition is met.Those using Ion as a library should be able to choose the behavior that will enact when this conditition is met.Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/695Unexpected end of script when nesting if inside match2018-08-08T21:24:02ZMichael Aaron Murphymmstick@pm.meUnexpected end of script when nesting if inside match*Created by: PigeonF*
**Reproduction**: Run the following piece of code
```
match "foo"
case "foo"
if true
echo "This is executed"
end
end
```
**Expected behavior**: "This is executed" gets pri...*Created by: PigeonF*
**Reproduction**: Run the following piece of code
```
match "foo"
case "foo"
if true
echo "This is executed"
end
end
```
**Expected behavior**: "This is executed" gets printed (it does) and ion exits successfully.
**Actual behavior**: "This is executed" gets printed and ion exits with "ion: unexpected end of script: expected end block for `Default`" and 1 as an exit code
**Build information**:
Ion built with `rustc 1.25.0-nightly (3ec5a99aa 2018-02-14)`,
`ion 1.0.0-alpha (x86_64-apple-darwin)
rev 22b3efc6eb29020b452c44ad057c394951f6b982`
**Misc**: This issue also occurs when trying to run `ion setup.ion build docs`.
Note: I just started looking into ion, so this might just be me being unable to grasp the syntaxIon Shell v1.0.0Roland KovácsRoland Kovácshttps://gitlab.redox-os.org/redox-os/ion/-/issues/711Alias values containing logical operator only executes the first operand.2018-08-14T17:49:42ZMichael Aaron Murphymmstick@pm.meAlias values containing logical operator only executes the first operand.*Created by: ishanjain28*
**Reproduction**:
alias test=mkdir ~/iontest && rmdir ~/iontest
test
**Expected behavior**:
Create a iontest folder in home directory and then delete it.
**Actual behavior**: [describe ...*Created by: ishanjain28*
**Reproduction**:
alias test=mkdir ~/iontest && rmdir ~/iontest
test
**Expected behavior**:
Create a iontest folder in home directory and then delete it.
**Actual behavior**: [describe the actual behavior, which is presented through the repro.].
Creates the directory but doesn't deletes it.
**Build information**:
rustc -V rustc 1.25.0-nightly (3ec5a99aa 2018-02-14)
git rev-parse HEAD 96d5b5d2ef53d8d9e93a4a41019560175cc12598
qemu-i386 -version 2.11.1
uname -a: Linux y50 4.15.9-1-ARCH #1 SMP PREEMPT Sun Mar 11 17:54:33 UTC 2018 x86_64 GNU/Linux
Ion version: ion 1.0.0-alpha (x86_64-unknown-linux-gnu) rev 6d5b5d2ef53d8d9e93a4a41019560175cc12598
Ion Shell v1.0.0Roland KovácsRoland Kovácshttps://gitlab.redox-os.org/redox-os/ion/-/issues/771Document default values and variables2020-12-06T17:01:50ZMichael Aaron Murphymmstick@pm.meDocument default values and variables* [x] `[ no_such_command whitespace duplicates ]`.
* [x] Make sure duplicates is mentioned in the manual
* [ ] Make sure all default values & variables are documented as well* [x] `[ no_such_command whitespace duplicates ]`.
* [x] Make sure duplicates is mentioned in the manual
* [ ] Make sure all default values & variables are documented as wellIon Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/776Disallow Repeated Assignment Keys2018-08-10T01:25:54ZMichael Aaron Murphymmstick@pm.meDisallow Repeated Assignment KeysThis should not be allowed:
```
let x x = 1 2
```
Nor should this:
```
fn func x x
```
In both cases, an error should be printed, and an exit status of 1 provided.This should not be allowed:
```
let x x = 1 2
```
Nor should this:
```
fn func x x
```
In both cases, an error should be printed, and an exit status of 1 provided.Ion Shell v1.0.0Roland KovácsRoland Kovácshttps://gitlab.redox-os.org/redox-os/ion/-/issues/777Array Index Range Assignment2021-06-01T13:04:51ZMichael Aaron Murphymmstick@pm.meArray Index Range AssignmentAs per the Ion specification:
### Array Index Range Assignment
[array-index-range-assignment]: #array-index-range-assignment
It is also possible to assign an array to replace a range of values. The array being assigned to
that region m...As per the Ion specification:
### Array Index Range Assignment
[array-index-range-assignment]: #array-index-range-assignment
It is also possible to assign an array to replace a range of values. The array being assigned to
that region may be smaller or larger than the region it is replacing.
```
$ let FOO = [1 2 3 4]
$ let FOO[..1] = [4 5 6]
$ let FOO[2..3] = [7]
$ echo @FOO
4 5 6 7
```Ion Shell v1.0.0stratactstratact1@gmail.comstratactstratact1@gmail.comhttps://gitlab.redox-os.org/redox-os/ion/-/issues/778Array Assignment Operators2018-07-02T20:42:57ZMichael Aaron Murphymmstick@pm.meArray Assignment OperatorsArithmetic may also be performed on arrays. These operations can be SIMD-accelerated.
- **Add**: `+=`
- **Subtract**: `-=`
- **Divide**: `/=`
- **Integer Divide**: `//=`
- **Multiply**: `*=`
- **Exponent**: `**=`
There are also some ar...Arithmetic may also be performed on arrays. These operations can be SIMD-accelerated.
- **Add**: `+=`
- **Subtract**: `-=`
- **Divide**: `/=`
- **Integer Divide**: `//=`
- **Multiply**: `*=`
- **Exponent**: `**=`
There are also some array-specific operations:
* [x] **Append** (`++`): Append values to the array
```
$ let ARRAY = [ 1 2 3 ]
$ let ARRAY ++= 4
$ let ARRAY ++= [5 6 7]
$ echo @ARRAY
1 2 3 4 5 6 7
```
* [x] **Append-Head** (`::`): Insert values at the beginning of the array
```
$ let ARRAY = [ 4 5 6 ]
$ let ARRAY ::= [ 1 2 3 ]
$ echo @ARRAY
1 2 3 4 5 6
```
* [x] **Difference** (`\\`): Retain values which are different from the array on the right
```
$ let ARRAY = [ 1 2 3 4 5 6 ]
$ let ARRAY \\= [1 3 5]
$ echo @ARRAY
2 4 6
```Ion Shell v1.0.0stratactstratact1@gmail.comstratactstratact1@gmail.comhttps://gitlab.redox-os.org/redox-os/ion/-/issues/787Get Ion Compiling w/ Stable Rust2018-07-22T22:01:51ZMichael Aaron Murphymmstick@pm.meGet Ion Compiling w/ Stable RustUnstable features required for stabilization:
- nll
- stdsimd
Features that have been stabilized:
Features which we have stopped using via a workaround:
- integer_atomics
- iterator_flatten
- test
Unstable features required for stabilization:
- nll
- stdsimd
Features that have been stabilized:
Features which we have stopped using via a workaround:
- integer_atomics
- iterator_flatten
- test
Ion Shell v1.0.0Michael Aaron Murphymmstick@pm.meMichael Aaron Murphymmstick@pm.mehttps://gitlab.redox-os.org/redox-os/ion/-/issues/788Associative Array Insertions2018-07-02T16:26:04ZMichael Aaron Murphymmstick@pm.meAssociative Array InsertionsAssociative arrays should allow inserting new keys.
```
let map[new_key] = value
```Associative arrays should allow inserting new keys.
```
let map[new_key] = value
```Ion Shell v1.0.0stratactstratact1@gmail.comstratactstratact1@gmail.comhttps://gitlab.redox-os.org/redox-os/ion/-/issues/789BTree-based Associative Arrays2018-07-03T16:05:06ZMichael Aaron Murphymmstick@pm.meBTree-based Associative ArraysShould act identically to the existing HashMap-based associative array.
```
let map:bmap[] = [ foo=1 bar=2 ]
```Should act identically to the existing HashMap-based associative array.
```
let map:bmap[] = [ foo=1 bar=2 ]
```Ion Shell v1.0.0stratactstratact1@gmail.comstratactstratact1@gmail.comhttps://gitlab.redox-os.org/redox-os/ion/-/issues/790Remove Plugin Support2018-07-23T03:51:54ZMichael Aaron Murphymmstick@pm.meRemove Plugin SupportWhile it was neat to see that it could be done, we should wait for a better solution that doesn't require using the C ABI.While it was neat to see that it could be done, we should wait for a better solution that doesn't require using the C ABI.Ion Shell v1.0.0Michael Aaron Murphymmstick@pm.meMichael Aaron Murphymmstick@pm.me