redox-os issueshttps://gitlab.redox-os.org/groups/redox-os/-/issues2020-12-12T22:18:47Zhttps://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/957Tracking Issue Shortcuts2020-12-12T22:18:57Zmatu3baTracking Issue ShortcutsList of necessary shortcuts (keypressing + alias)
#845
#934
#940
#951
List of (half)broken shortcuts
#907
#923
Improvements
#941
#930
#929
#928List of necessary shortcuts (keypressing + alias)
#845
#934
#940
#951
List of (half)broken shortcuts
#907
#923
Improvements
#941
#930
#929
#928Ion 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/954Tracking Issue feature comparison to other command shells2020-12-12T22:20:14Zmatu3baTracking Issue feature comparison to other command shellsSince we aim for speed and reasonable simplicity, this tracks what feature the shell has in a comprehensive list shamelessly [copied from wikipedia](https://en.wikipedia.org/wiki/Comparison_of_command_shells).
Non-goals will be over tim...Since we aim for speed and reasonable simplicity, this tracks what feature the shell has in a comprehensive list shamelessly [copied from wikipedia](https://en.wikipedia.org/wiki/Comparison_of_command_shells).
Non-goals will be over time separated into a second table with free text.
This is a WIP for documentation and project oversight from a very general perspective and intended to be in the manual.
*General*
| Feature | implemented | doc | integration tests | bug free |
| ---------------------------- | ---------- | ------ | ----------------- | -------- |
| Mouse support | copy/paste | | | |
| [[Unicode]] support | yes | | | |
| [[ISO 8601]] support | yes | | | |
| Console redirection | yes | | | |
| Stream redirection | yes | | | |
| Logging | yes | | | |
*Interactive*
| Feature | implemented | doc | integration tests | bug free |
| ---------------------------- | ---------- | ------ | ----------------- | -------- |
| Completion: command name | yes | | | |
| Completion: path | yes | | | |
| Completion: command argument | - | | plan: shellac | |
| Completion: wildcard | - | | | |
| History commands | yes | | | |
| Automatic suggestions | yes | | plan: shellac | |
| Colored highlighting | - | | | |
| Text highlighting | - | | | |
| Syntax highlighting | - | | | |
| Directory history, stack etc | yes | | | |
| Implicit `cd` | yes | | | |
| Auto correction | - | | | |
| Integrated environment | - | | | |
| Snippets | - | | | |
| Value prompt | - | | | |
| options selector | - | | | |
| Progress indicator | - | | | |
| Context sensitive help | - | | | |
| Command builder | - | | | |
*Background execution*
| Feature | implemented | doc | integration tests | bug free |
| ---------------------------- | ---------- | ------ | ----------------- | -------- |
| process tracking | - | | | |
*Programming*
| Feature | implemented | doc | integration tests | bug free |
| ---------------------------- | ---------- | ------ | ----------------- | -------- |
| functions | yes | | | |
| exception handling | yes | | | |
| floating point | yes | | | |
| math function library | - | | | |
| linear array or lists | yes | | | |
| associative arrays | yes | | | |
| lambda functions | - | | | |
| eval functions | yes | | | |
*Strings and filenames*
| Feature | implemented | doc | integration tests | bug free |
| ---------------------------- | ---------- | ------ | ----------------- | -------- |
| alternation | - | | | |
| build-in regex | - | | | |
| globbing qualifiers | - | | | |
| recursive globbing | - | | | |
*IPC*
| Feature | implemented | doc | integration tests | bug free |
| ---------------------------- | ---------- | ------ | ----------------- | -------- |
| pipes | yes | | | |
| command substitution | yes | | | |
| process substitution | - | | | |
| subshells | - | | | |
| tcp/udp | - | | | |
| keystroke stacking | - | | | |
*Security*
| Feature | implemented | doc | integration tests | bug free |
| ---------------------------- | ---------- | ------ | ----------------- | -------- |
| secure password prompt | - | | | |
| encrypted variables | - | | | |
| file/directory passwords | - | | | |
| execute permissions | - | | | |
| untrusted script blocking | - | | | |
| restricted subshell set | - | | | |
| safe data subset | - | | | |
| stack smashing secured? | ? | | | |
| overflows possible? | ? | | | |
| reviewed? | ? | | | |Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/951abbrev feature2020-12-12T22:21:13Zmanfredlotzabbrev featureIn zsh there are so called global aliases, i.e I can define `alias -g C='| wc -l'` and when typing `ls -l C ` it will be expanded to `ls -l | wc -l`.
I think something like this would be a good feature for ion. One could name it `abbrev...In zsh there are so called global aliases, i.e I can define `alias -g C='| wc -l'` and when typing `ls -l C ` it will be expanded to `ls -l | wc -l`.
I think something like this would be a good feature for ion. One could name it `abbrev` and above definition could look like `abbrev L = '| wc -l`
Wdyt?unplannedhttps://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/944Dynamic Configuration2021-01-08T16:43:43ZNathaniel Barragancontact@nathanielbarragan.xyzDynamic ConfigurationI do notice that the configuration of this shell dynamically (After compilation) is lacking. Perhaps we can add some builtins for configuration, OR make environment variables change different configurations? For example, turning implicit...I do notice that the configuration of this shell dynamically (After compilation) is lacking. Perhaps we can add some builtins for configuration, OR make environment variables change different configurations? For example, turning implicit cd off could be done by setting the environment variable `ION_IMPLICIT_CD=false`?
I suppose this is more of an RFC as opposed to an actual issue?unplannedhttps://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/941Make Ctrl+W more similar to Fish shell, regarding paths2020-12-12T22:29:33ZÉrico Nogueira RolimMake Ctrl+W more similar to Fish shell, regarding pathsOne thing the Fish shell does pretty well is the behavior of Ctrl+W. If you are typing a path like `/path/to/thing` and press Ctrl+W, the result is `/path/to/`, instead of erasing the whole path like Ion (and Bash, for that matter) does.One thing the Fish shell does pretty well is the behavior of Ctrl+W. If you are typing a path like `/path/to/thing` and press Ctrl+W, the result is `/path/to/`, instead of erasing the whole path like Ion (and Bash, for that matter) does.unplannedhttps://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/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/929cdpath (cd/autocomplete to specified directories from anywhere)2021-06-03T10:25:35Zunrelentingtechcdpath (cd/autocomplete to specified directories from anywhere)In zsh, you can set e.g. `cdpath=(~/src/github.com/myfreeweb)` and then from any directory you can type `dotfiles` to cd to `~/src/github.com/myfreeweb/dotfiles`, and autocompletion would offer these directories (subdirectories of anythi...In zsh, you can set e.g. `cdpath=(~/src/github.com/myfreeweb)` and then from any directory you can type `dotfiles` to cd to `~/src/github.com/myfreeweb/dotfiles`, and autocompletion would offer these directories (subdirectories of anything on `cdpath`) anywhere too.unplannedhttps://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/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/921Package install fails in Ubuntu 18.04 container2020-12-12T22:45:05ZColeman McFarlandPackage install fails in Ubuntu 18.04 containerI am not clear if this is supposed to be supported.
See [this dockerfile](https://gitlab.redox-os.org/coleman/ion-container/blob/master/Dockerfile.ubuntu-18.04-packaged) for the build steps I took.
This yields a dependency error:
```
...I am not clear if this is supposed to be supported.
See [this dockerfile](https://gitlab.redox-os.org/coleman/ion-container/blob/master/Dockerfile.ubuntu-18.04-packaged) for the build steps I took.
This yields a dependency error:
```
Step 5/5 : RUN apt-get install ion-shell -y
---> Running in 9e7eb31aac46
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
ion-shell : Depends: libc6 (>= 2.29) but 2.27-3ubuntu1 is to be installed
```Ion Shell v1.0.0https://gitlab.redox-os.org/redox-os/ion/-/issues/920Official container builds2021-06-01T13:51:19ZColeman McFarlandOfficial container buildsShould we have official container builds for ion that live alongside our [other images](https://hub.docker.com/u/redoxos)? We could use docker, or another OCI container builder.
Benefits:
* Another way for interested folks to try ion.
*...Should we have official container builds for ion that live alongside our [other images](https://hub.docker.com/u/redoxos)? We could use docker, or another OCI container builder.
Benefits:
* Another way for interested folks to try ion.
* Test environments for ion's debian packages (and redhat, and alpine...)
* The ability to use `image: redoxos/ion:0.x.x` in _other_ CI jobs, so we can dogfood more ion scripts for automation
Drawbacks:
* builds taking up resources on the serverIon Shell v1.0.0matu3bamatu3bahttps://gitlab.redox-os.org/redox-os/ion/-/issues/918Plan for sourcing/translating sh scripts?2020-12-12T22:46:30ZSteven PeasePlan for sourcing/translating sh scripts?Once general concern that I have so far is that Ion introduces a lot of idiosyncratic behavior. It’s neither a Rust REPL with a subset of the language, but it also isn’t compatible with sh either. It’s kind of a mix of concepts of both. ...Once general concern that I have so far is that Ion introduces a lot of idiosyncratic behavior. It’s neither a Rust REPL with a subset of the language, but it also isn’t compatible with sh either. It’s kind of a mix of concepts of both. This introduces an additional barrier to learning and adoption.
One particular issue is that a lot of packages will install a shell script to set up environment variables etc. For instance, nix. There doesn’t seem to be any good way to source this file, and translating it currently would require rewriting it by hand (and potentially manually updating it if it changes).
A few thoughts I had:
1) An external translation application that can easily be used with a source directive
2) An sh-compatibility mode that can be invoked through use of a special sh directive
3) An sh-compatibility mode triggered by the shebang (this might still require annotating files, but be O(1) every time)
4) An extraction mode that actually forks an sh-compatible shell, then extracts default/new/specified environment variables at the end of that process back into the Ion environment
To keep the scope manageable, if it’s a pain to parse sh, you could probably get away with providing a subset of the most commonly used language features.unplannedhttps://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/913No expected practices documentation for startup2020-12-12T22:51:57ZSteven PeaseNo expected practices documentation for startupGetting ion set up as my default shell.
I couldn't find a "best practices" / "expected practices" documentation for startup scripts. Eg equivalents of .profile, .bashrc, .bash_profile, etc. For now I've just been putting everything in t...Getting ion set up as my default shell.
I couldn't find a "best practices" / "expected practices" documentation for startup scripts. Eg equivalents of .profile, .bashrc, .bash_profile, etc. For now I've just been putting everything in the initrc file.
Thanks!Ion Shell v1.0.0