ion issueshttps://gitlab.redox-os.org/redox-os/ion/-/issues2021-06-24T21:01:48Zhttps://gitlab.redox-os.org/redox-os/ion/-/issues/1004Ctrl-F jumps to end of line after history2021-06-24T21:01:48ZasvlnCtrl-F jumps to end of line after historybug: When using emacs keybindings, after using `Ctrl-P`/`Ctrl-N` to cycle through previously used commands, the first use of `Ctrl-F` jumps the cursor to the end of the line.
expect: Cursor should move one character to the right.
relat...bug: When using emacs keybindings, after using `Ctrl-P`/`Ctrl-N` to cycle through previously used commands, the first use of `Ctrl-F` jumps the cursor to the end of the line.
expect: Cursor should move one character to the right.
related: none
kernel: linux5.12
version: ion 1.0.0-alpha (x86_64-unknown-linux-gnu) / rev 9d76f020de899e05ae121ccfcbf7c85865b51276
interaction: none
context: This unexpected cursor jump occurs when first firing `Ctrl-F` after any new firing of `Ctrl-P` or `Ctrl-N`. The unexpected action persists even when cursor is moved with `Ctrl-A` or the arrow keys before firing `Ctrl-F`.
If `Ctrl-d` is called to delete a character before firing `Ctrl-F` then the bug does not occur and the cursor moves 1 space to the right as expected.https://gitlab.redox-os.org/redox-os/ion/-/issues/995neovim: can not read /tmp file created by shell2020-12-30T10:16:06Zmatu3baneovim: can not read /tmp file created by shellbug: I would like to use ion as shell inside neovim to read build logs in a new buffer or new tab. However neovim can not read /tmp files. Probably, because they are not created?
expect: ion should create /tmp files upon request and re...bug: I would like to use ion as shell inside neovim to read build logs in a new buffer or new tab. However neovim can not read /tmp files. Probably, because they are not created?
expect: ion should create /tmp files upon request and reading /tmp files should be possible
related: none
code: input to neovim in visual mode
```sh
:r !ls
```
expect: output
```txt
folder1
folder2
...
```
actual: output
```txt
Shell exit 1
E485: can not read file /tmp/nvimnokcRa/1
...
```
kernel: linux5.7
version: e033ca1c0c2ff8d1932137d2ed7354d003ad9cdc
interaction: none
context: run inside alacritty
behavior of bash: worksIon Shell v1.0.0https://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/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/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/979History is not saved2020-12-27T23:41:17Zbm-stschneiderHistory is not savedbug: description
When I have a terminal open I can type `history` and see the history of commands. When I open the file it stays empty
expect: outcome description
History persists sessions
kernel: mac10.14.6
version:
ion 1.0.0-alpha (...bug: description
When I have a terminal open I can type `history` and see the history of commands. When I open the file it stays empty
expect: outcome description
History persists sessions
kernel: mac10.14.6
version:
ion 1.0.0-alpha (x86_64-apple-darwin)
rev 044565f9d2817bcea4f8549578a8bfa52f849c32
context: Alacrittyhttps://gitlab.redox-os.org/redox-os/ion/-/issues/963bug: source-sh broken, improve documentation2020-12-16T00:59:25Zmaxice8bug: source-sh broken, improve documentationI'm trying to use `source-sh` to get some variables from an Alpine Linux APKBUILD into the environment of the Ion shell.
The APKBUILD looks like this:
```
# Contributor: dai9ah <dai9ah@protonmail.com>
# Maintainer: dai9ah <dai9ah@proto...I'm trying to use `source-sh` to get some variables from an Alpine Linux APKBUILD into the environment of the Ion shell.
The APKBUILD looks like this:
```
# Contributor: dai9ah <dai9ah@protonmail.com>
# Maintainer: dai9ah <dai9ah@protonmail.com>
pkgname=2bwm
pkgver=0.3
pkgrel=0
pkgdesc="Fast floating window manager"
url="https://github.com/venam/2bwm"
arch="all"
license="ISC"
makedepends="libxcb-dev xcb-util-keysyms-dev xcb-util-wm-dev xcb-util-xrm-dev"
options="!check" # no test suite
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/venam/2bwm/archive/v$pkgver.tar.gz"
prepare() {
default_prepare
sed -i Makefile -e "/CFLAGS/{s/+=-Os /+=/}"
}
build() {
make
}
package() {
make PREFIX=/usr DESTDIR="$pkgdir" install
}
sha512sums="088a97e5245287890c72e2b0685f7348a4cc0fd49582893b7ce7a081f80a4d7454a3c0eadf4609589314351ded02fd8b75548019b782e797350ad5db5c939f92 2bwm-0.3.tar.gz"
```
After sourcing it with `source-sh` i expect the variables in the root of the document to be accessible from Ion.Ion Shell v1.0.0https://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/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/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/934Aliases following a subexecutor do not work2020-12-25T02:34:08Zcinerea0Aliases following a subexecutor do not workAttempting to execute an aliased command prefaced by `sudo` or `doas` does not work like how it does in other shells. The following aliases have been set in ion's initrc:
* alias ls = "ls --color"
* alias sudo = "sudo "
* alias doas =...Attempting to execute an aliased command prefaced by `sudo` or `doas` does not work like how it does in other shells. The following aliases have been set in ion's initrc:
* alias ls = "ls --color"
* alias sudo = "sudo "
* alias doas = "doas "
* alias vpm = "vpm --color=yes"
* alias vsv = "vsv -c yes"
These are the results, with the first picture being the expected output that I get from zsh and the second picture being the output I get from ion:
![zsh-color](/uploads/083a4cb9b06b8a83a5960bb1e1be862b/zsh-color.png)
![ion-color](/uploads/aa92b0fe3b053307830b66d6e8db6c90/ion-color.png)
Bizarrely, ion works perfectly when it is running inside tmux:
![ion-color2](/uploads/032de7ad22e5ed16ebb3c4bd2a2fdf5c/ion-color2.png)https://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/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/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/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/864Unquoted strings aren't being condensed2019-04-14T18:18:59ZMichael Aaron Murphymmstick@pm.meUnquoted strings aren't being condensed```
let a = "$(echo -e 'foo bar\nfizz buzz')"
echo $a
```
This outputs
```
foo bar fizz buzz
```
Ideally this should be
```
foo bar fizz buzz
``````
let a = "$(echo -e 'foo bar\nfizz buzz')"
echo $a
```
This outputs
```
foo bar fizz buzz
```
Ideally this should be
```
foo bar fizz buzz
```