ion issueshttps://gitlab.redox-os.org/redox-os/ion/-/issues2021-06-01T11:06:25Zhttps://gitlab.redox-os.org/redox-os/ion/-/issues/420testing: Increase Test Unit Coverage2021-06-01T11:06:25ZMichael Aaron Murphymmstick@pm.metesting: Increase Test Unit CoverageWe should perform an extensive code review at some point as we near a stable release, and create tests everywhere where possible (likely refactoring with closures to increase the test-ability of certain functions). When we are ready to d...We should perform an extensive code review at some point as we near a stable release, and create tests everywhere where possible (likely refactoring with closures to increase the test-ability of certain functions). When we are ready to do this, we should make a list of all the source files in the codebase, and then one by one review, test, and check that file off the list.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.0betahttps://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/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/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/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/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/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/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/907(Re)consider @ token for array expansion - or allow disabling it in interacti...2020-12-12T22:58:09Ztheduke(Re)consider @ token for array expansion - or allow disabling it in interactive modeI love Ion's speed, and used it as my main shell for a while.
But I ultimately stopped due to the big annoyance of the `@` symbol being used for array expansion. (in part... the other element was lack of dynamic complections, which is no...I love Ion's speed, and used it as my main shell for a while.
But I ultimately stopped due to the big annoyance of the `@` symbol being used for array expansion. (in part... the other element was lack of dynamic complections, which is now being worked on in the Shellac effort, which is awesome!)
This now means having to quote every occurence of `@`.
Due to the prevalence of `@` in things you might type in the shell, the token seems like a suboptimal choice.
(Git URLls, database URIs, FTP, emails, ....)
I briefly mentioned this in chat ages ago, and someone brought up the lack of alternative tokens.
If the `@` symbol is already too ingrained or there isn't a viable alternative, another option could be providing an option that disables `@` in the interactive shell to remedy this.Ion Shell v1.0.0betahttps://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/916HISTFILE doesn't appear to work in ion-1.0.5 (Arch Linux)2020-12-13T00:20:28ZSteven PeaseHISTFILE doesn't appear to work in ion-1.0.5 (Arch Linux)In ~/.config/ion/initrc I placed:
```
source "${HOME}/.profile"
let HISTFILE="${HOME}/.histfile"
export TERM="xterm-256color"
which omniprompt > /dev/null || cargo install --git https://github.com/spease/omniprompt.git
fn PROMPT
&& om...In ~/.config/ion/initrc I placed:
```
source "${HOME}/.profile"
let HISTFILE="${HOME}/.histfile"
export TERM="xterm-256color"
which omniprompt > /dev/null || cargo install --git https://github.com/spease/omniprompt.git
fn PROMPT
&& omniprompt 0 || omniprompt "E"
end
```
This still doesn't appear to use .histfile . In the end, I replaced the default history location with a symlink and it worked. However, it'd be preferable for the config setting to work.Ion Shell v1.0.0betahttps://gitlab.redox-os.org/redox-os/ion/-/issues/923question+manual: What is the proper way for passing absolute paths?2020-12-12T22:44:21Zmatu3baquestion+manual: What is the proper way for passing absolute paths?Often scripts are called from a relative path, in my case `/opt/scripts/`.
Sadly tab completion only shows me the program, but on enter I cd to that folder.
So I need to type the whole path manually, which is a pain.
What would you sugg...Often scripts are called from a relative path, in my case `/opt/scripts/`.
Sadly tab completion only shows me the program, but on enter I cd to that folder.
So I need to type the whole path manually, which is a pain.
What would you suggest, aside of setting $PATH or adding all folders to initrc, to circumvent that?Ion Shell v1.0.0betahttps://gitlab.redox-os.org/redox-os/ion/-/issues/924Script calling with parameter for ion results in ion only evaluating the para...2020-12-16T18:02:06Zmatu3baScript calling with parameter for ion results in ion only evaluating the parameter and quiting the scriptDefer ion parameters [program or path name shall never start with - or -- (otherwise it gets messy to parse/decide)]
Case 1: If most leftward argument is ion option, only valid ion options may follow or error.
Case 2: If not, defer e...Defer ion parameters [program or path name shall never start with - or -- (otherwise it gets messy to parse/decide)]
Case 1: If most leftward argument is ion option, only valid ion options may follow or error.
Case 2: If not, defer evaluation to use explicit statement (later to be specified).
Other solution would explicitly check all most leftward arguments ever to evaluate for shell option, which looks inefficient.
```
#!/usr/bin/env ion
echo 'test'
```
called by
`# ./test.sh --version`
result:
ion 1.0.0-alpha (x86_64-unknown-linux-gnu)
rev a5fb10c7741be5108d262e03db33b48360279cc6Ion Shell v1.0.0betamatu3bamatu3bahttps://gitlab.redox-os.org/redox-os/ion/-/issues/938`++=` and `::=` operators act on numeric types2020-12-12T22:33:13ZRoland Kovács`++=` and `::=` operators act on numeric types
When a variable is updated in a `let` binding the numeric types (`int` and `float`).
```rust
let i:int = 1
let i ::= -
let i ++= .5
echo $((-i + 0.5))
1
```
*ion version*: f9f2ae0
When a variable is updated in a `let` binding the numeric types (`int` and `float`).
```rust
let i:int = 1
let i ::= -
let i ++= .5
echo $((-i + 0.5))
1
```
*ion version*: f9f2ae0Ion Shell v1.0.0betahttps://gitlab.redox-os.org/redox-os/ion/-/issues/940Ctrl+W in vi mode doesn't erase the word before the cursor2020-12-13T00:46:37ZÉrico Nogueira RolimCtrl+W in vi mode doesn't erase the word before the cursorHey there! In vi mode, Ctrl+W doesn't have any effect, even though it has the intended effect in Emacs mode (erasing the word behind the cursor).Hey there! In vi mode, Ctrl+W doesn't have any effect, even though it has the intended effect in Emacs mode (erasing the word behind the cursor).Ion Shell v1.0.0betahttps://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/947Make a new release2020-12-12T22:25:36Zwucke13Make a new releaseThe last release is quite old. AFAIK so old, that it won't even compile on stable as of now. Please make a new release.The last release is quite old. AFAIK so old, that it won't even compile on stable as of now. Please make a new release.Ion Shell v1.0.0betahttps://gitlab.redox-os.org/redox-os/ion/-/issues/955bug: arithmetic expansion can not handle nested brackets `()`2020-12-12T22:19:45Zmatu3babug: arithmetic expansion can not handle nested brackets `()`bug: description
expect: proper handling of brackets
related: #938
code: input
```
echo $(((1 + 1)))
```
expect: output
```
2
```
Actual output `ion: syntax error: syntax error: ')' at position 15 is out of place`
kernel: linux5.6....bug: description
expect: proper handling of brackets
related: #938
code: input
```
echo $(((1 + 1)))
```
expect: output
```
2
```
Actual output `ion: syntax error: syntax error: ')' at position 15 is out of place`
kernel: linux5.6.3-2
version: `ion --version` ion 1.0.0-alpha 1fbd29a6d539faa6eb0f3186a361e208d0a0bc05Ion Shell v1.0.0betahttps://gitlab.redox-os.org/redox-os/ion/-/issues/958Tracking Issue Documentation2020-12-12T22:18:47Zmatu3baTracking Issue Documentation#939 fn description
#923 absolute paths
#913 startup practice (init scripts)
#907 github and mail have @ which is reserved
#905 missing feature in help command
#898 shortcut
#897 lambda function?
#895 slicing syntax inconsi...#939 fn description
#923 absolute paths
#913 startup practice (init scripts)
#907 github and mail have @ which is reserved
#905 missing feature in help command
#898 shortcut
#897 lambda function?
#895 slicing syntax inconsistency in manual
#893 usage inside virtualization
#810 history reverse searchIon Shell v1.0.0betahttps://gitlab.redox-os.org/redox-os/ion/-/issues/971Disabling autosuggest2020-12-13T00:45:40Zcinerea0Disabling autosuggestCurrently, I do not see any way in the documentation to disable the autosuggestion feature. Is this planned for the future? Additionally, if this feature is planned, will it be possible to disable the autosuggestion feature without disab...Currently, I do not see any way in the documentation to disable the autosuggestion feature. Is this planned for the future? Additionally, if this feature is planned, will it be possible to disable the autosuggestion feature without disabling the history substring search functionality?Ion Shell v1.0.0betahttps://gitlab.redox-os.org/redox-os/ion/-/issues/980let HISTORY_TIMESTAMP = 1 doesn't work2020-12-12T22:01:00ZPerry Thompsonlet HISTORY_TIMESTAMP = 1 doesn't workSetting `let HISTORY_TIMESTAMP = 1` in my ~/.config/ion/initrc file, and then running `ion`, when I run `echo $HISTORY_TIMESTAMP` the output is `0` and my history has no timestamps.
I'm running Gentoo Testing with the master branch of i...Setting `let HISTORY_TIMESTAMP = 1` in my ~/.config/ion/initrc file, and then running `ion`, when I run `echo $HISTORY_TIMESTAMP` the output is `0` and my history has no timestamps.
I'm running Gentoo Testing with the master branch of ion (commit 935811eafdd0436acc5f6981d1fef20076c54c5c).Ion Shell v1.0.0betahttps://gitlab.redox-os.org/redox-os/ion/-/issues/986setup CI and regression tests for macOS2021-06-01T10:24:06ZRoland Teppsetup CI and regression tests for macOSmacOS: install: illegal option -- D
I was trying to install ion shell on macOS and this is the error I am getting when executing `sudo make install`
```bash
❯ sudo make install prefix=/usr
install -Dm0755 target/release/ion //usr/bin/i...macOS: install: illegal option -- D
I was trying to install ion shell on macOS and this is the error I am getting when executing `sudo make install`
```bash
❯ sudo make install prefix=/usr
install -Dm0755 target/release/ion //usr/bin/ion
install: illegal option -- D
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 file2
install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 ... fileN directory
install -d [-v] [-g group] [-m mode] [-o owner] directory ...
make: *** [install] Error 64
```
Google search suggests that -D option does not exist under macOS/Darwin and suggests using -d instead, but I am not experienced enough with install utility (or Makefile) to understand the subtle differences of the two and fix it myself.Ion Shell v1.0.0betahttps://gitlab.redox-os.org/redox-os/ion/-/issues/988Array slicing is broken2021-01-03T07:28:42Zmatu3baArray slicing is brokenbug: The manual claims array slicing is possible, whereas this is not true.
expect: outcome description
related: #973
code: input
```
let array = [{0...5}]
echo @array[0,3..]
```
expect: output
```
0 3 4 5
```bug: The manual claims array slicing is possible, whereas this is not true.
expect: outcome description
related: #973
code: input
```
let array = [{0...5}]
echo @array[0,3..]
```
expect: output
```
0 3 4 5
```Ion 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/991Simplify slicing2020-12-12T21:56:29Zmatu3baSimplify slicingfeat: Remove edge cases
BREAKING CHANGE: progams relying on slicing MUST be revalidated
perf: impact
performance none
usability increase
maintainability increase
code: input
```sh
let array = [{1..10}]
let array2 = [{1...10}]
echo...feat: Remove edge cases
BREAKING CHANGE: progams relying on slicing MUST be revalidated
perf: impact
performance none
usability increase
maintainability increase
code: input
```sh
let array = [{1..10}]
let array2 = [{1...10}]
echo @array
echo @array2
```
expect: output
```
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
```
actual: output
```
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 10
```
reason: better usability and remove edge case
context: We should reuse the inclusive annotation for slicing to simplify working with the shell.
```
let array2 = [{1..=10}]
```Ion Shell v1.0.0betahttps://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.0betamatu3bamatu3ba