ion issueshttps://gitlab.redox-os.org/redox-os/ion/-/issues2020-12-12T21:56:29Zhttps://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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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.0beta