redox-os issueshttps://gitlab.redox-os.org/groups/redox-os/-/issues2018-06-12T14:22:03Zhttps://gitlab.redox-os.org/redox-os/ion/-/issues/410Stripping newlines from subshell expansion2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meStripping newlines from subshell expansion*Created by: huntergoldstein*
# Current Behavior
Grabbing the output of a command from an unquoted subshell expansion will strip the newlines from the output. For example:
```
$ ls -l
total 0
-rw-r--r-- 1 hunter hunter 0 Jul 13 12:...*Created by: huntergoldstein*
# Current Behavior
Grabbing the output of a command from an unquoted subshell expansion will strip the newlines from the output. For example:
```
$ ls -l
total 0
-rw-r--r-- 1 hunter hunter 0 Jul 13 12:26 bar
-rw-r--r-- 1 hunter hunter 0 Jul 13 12:26 baz
-rw-r--r-- 1 hunter hunter 0 Jul 13 12:26 foo
$ let var = $(ls -l)
$ let
...
var = total 0 -rw-r--r-- 1 hunter hunter 0 Jul 13 12:26 bar -rw-r--r-- 1 hunter hunter 0 Jul 13 12:26 baz -rw-r--r-- 1 hunter hunter 0 Jul 13 12:26 foo
...
```
# Proposal
I believe it is clearer if sub-shell expansion does not modify the output of the shell (some discussion in #405). Other thoughts? https://gitlab.redox-os.org/redox-os/ion/-/issues/380Enable Piping Functions & Background Execution2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meEnable Piping Functions & Background ExecutionMuch like builtins, functions should also be able to be piped, and if the function is specified to run in the background, it should be forked.Much like builtins, functions should also be able to be piped, and if the function is specified to run in the background, it should be forked.https://gitlab.redox-os.org/redox-os/ion/-/issues/408Globbing Issue w/ ? in URLs2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meGlobbing Issue w/ ? in URLs*Created by: nivkner*
**Reproduction**: [describe how you are able to reproduce ("trigger") this bug/issue.]
use curl on a youtube URL leading to a video (any video seems to have this effect)
**Expected behavior**: [describe the beh...*Created by: nivkner*
**Reproduction**: [describe how you are able to reproduce ("trigger") this bug/issue.]
use curl on a youtube URL leading to a video (any video seems to have this effect)
**Expected behavior**: [describe the behavior you would expect the repro to yield.]
with verbose output:
```
* Trying 216.58.208.46...
* TCP_NODELAY set
* Connected to youtube.com (216.58.208.46) port 443 (#0)
* ...
```
otherwise nothing.
**Actual behavior**: [describe the actual behavior, which is presented through the repro.].
with verbose output:
```
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
```
otherwise just the second line.
**Build information**: [output of `rustc -V`, `git rev-parse HEAD`, `qemu-i386 -version`, `uname -a`, etc.]
Ion version 1.0.4 Alpha, linux kernel 4.11.9-1 on antergos, gnome 3.24.2
**Blocking/related**: [issues or PRs blocking or being related to this issue.]
**Misc**: [optional: for other relevant information that should be known or cannot be described in the other fields.]
when trying to reduce the number of elements in the url, it is recognized up-to the use of `?`.
same happens with /playlist.
also happens with youtube-dl, though the cause might be the same.
------
_If the above does not fit the nature of the issue feel free to modify it._
https://gitlab.redox-os.org/redox-os/ion/-/issues/313'unterminated method' on a string2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.me'unterminated method' on a string*Created by: aeosynth*
echo $x '()'
ion: syntax error: unterminated method*Created by: aeosynth*
echo $x '()'
ion: syntax error: unterminated methodhttps://gitlab.redox-os.org/redox-os/ion/-/issues/385Fix `cat /dev/urandom | head`2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meFix `cat /dev/urandom | head`For some reason, this hangs Ion (Ion no longer listens to signals), rather than exiting immediately. Likely a foreground issue, and a piping issue.
- [x] Fix Foreground Handling
- [ ] Processes should receive SIGPIPEFor some reason, this hangs Ion (Ion no longer listens to signals), rather than exiting immediately. Likely a foreground issue, and a piping issue.
- [x] Fix Foreground Handling
- [ ] Processes should receive SIGPIPEhttps://gitlab.redox-os.org/redox-os/ion/-/issues/348double escaping2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.medouble escaping*Created by: aeosynth*
touch '(x)'
rm \(<Tab> # rm \\(x\)
ion: syntax error: '(' at position 6 is out of place*Created by: aeosynth*
touch '(x)'
rm \(<Tab> # rm \\(x\)
ion: syntax error: '(' at position 6 is out of placehttps://gitlab.redox-os.org/redox-os/ion/-/issues/384`cd` Tab Completions Should Only Complete Directories2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.me`cd` Tab Completions Should Only Complete DirectoriesAs the title says, the `cd` command should only have directory completions.As the title says, the `cd` command should only have directory completions.https://gitlab.redox-os.org/redox-os/ion/-/issues/414Make End Keyword In Case Statements Optional2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meMake End Keyword In Case Statements OptionalThis is what Fish does, as the `case` keyword already denotes that a new case block is being specified, so I'm not sure I see the value in requiring the end keyword to end a case.This is what Fish does, as the `case` keyword already denotes that a new case block is being specified, so I'm not sure I see the value in requiring the end keyword to end a case.https://gitlab.redox-os.org/redox-os/ion/-/issues/389Implement Inline Methods2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meImplement Inline MethodsI've decided that we will pursue implementing this on top of our existing method syntax. The rules are simple, but might require some complex brain work to get the parser ready and capable of parsing the additional rule. The purpose of i...I've decided that we will pursue implementing this on top of our existing method syntax. The rules are simple, but might require some complex brain work to get the parser ready and capable of parsing the additional rule. The purpose of inline methods is to prevent the need to round trip results to variables and increasing the number of lines of code to parse and execute, costing time and energy, of which we have limited amounts of both.
Basically, it works as follows: if the input parameter in a method begins with `$`, `@`, `[`, `"`, or `'`, then that parameter is an expression and should be parsed as such. Otherwise, treat the parameter as the preferred variable type.
# As Expression
```ion
let lines = @lines($read("filename"))
let lines = @lines($(cmd args...))
let lines = @lines($string_var)
```
# As Variable
```ion
let lines = @lines(string_var)
```https://gitlab.redox-os.org/redox-os/ion/-/issues/415constant crash with large history2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meconstant crash with large history*Created by: aeosynth*
**Reproduction**:
for x in $(seq 2000); echo $x >> ~/.local/share/ion/history; end
fatal runtime error: out of memory
fish: “ion” terminated by signal SIGILL (Illegal instruction)
**Expected be...*Created by: aeosynth*
**Reproduction**:
for x in $(seq 2000); echo $x >> ~/.local/share/ion/history; end
fatal runtime error: out of memory
fish: “ion” terminated by signal SIGILL (Illegal instruction)
**Expected behavior**: having a large history does not crash the shell
**Actual behavior**: shell becomes unusable (constantly OOM)
**Build information**: [output of `rustc -V`, `git rev-parse HEAD`, `qemu-i386 -version`, `uname -a`, etc.]
rustc 1.19.0-beta.3 (4b6f4f353 2017-07-07)
5b434727642243eb4d198acfff4be1e87b06e339
Linux void 4.11.10_1 #1 SMP PREEMPT Wed Jul 12 17:24:18 UTC 2017 x86_64 GNU/Linux
**Misc**: edit: after using ion, the history file blows up to over 1 gighttps://gitlab.redox-os.org/redox-os/ion/-/issues/347no completion after special chars2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meno completion after special chars*Created by: aeosynth*
```
touch 'f(x)'
rm f\(<Tab> # no completion
```*Created by: aeosynth*
```
touch 'f(x)'
rm f\(<Tab> # no completion
```https://gitlab.redox-os.org/redox-os/ion/-/issues/315Obtain Length of Array/String2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meObtain Length of Array/StringWe need to come up with a syntax for obtaining the length of an array/string. Arrays are counted by elements, and strings are counted by graphemes. Perhaps this approach can be taken?
```ion
let length = $len(string)
let length = @l...We need to come up with a syntax for obtaining the length of an array/string. Arrays are counted by elements, and strings are counted by graphemes. Perhaps this approach can be taken?
```ion
let length = $len(string)
let length = @len(array)
```Michael Aaron Murphymmstick@pm.meMichael Aaron Murphymmstick@pm.mehttps://gitlab.redox-os.org/redox-os/ion/-/issues/391Unwrap Or Methods2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meUnwrap Or MethodsThis is another set of methods that are trivial to implement. If the given variable does not exist, then use the specified default value. Only question is, should we also consider empty variables as not existing?
- $unwrap_or(string, ...This is another set of methods that are trivial to implement. If the given variable does not exist, then use the specified default value. Only question is, should we also consider empty variables as not existing?
- $unwrap_or(string, "default value")
- @unwrap_or(array, [default, array])https://gitlab.redox-os.org/redox-os/ion/-/issues/419Fix `echo hello#world`2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meFix `echo hello#world`The output used to be `hello#world`, but it seems the parsing has changed so that the `#world` is cut off. This is more than likely related to the `StatementSplitter`. We should implement tests to ensure that it doesn't happen again in t...The output used to be `hello#world`, but it seems the parsing has changed so that the `#world` is cut off. This is more than likely related to the `StatementSplitter`. We should implement tests to ensure that it doesn't happen again in the future.https://gitlab.redox-os.org/redox-os/ion/-/issues/345empty string arguments2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meempty string arguments*Created by: aeosynth*
the empty string is not treated as a valid argument:
```
# touch a
# rename '' 0 a
rename: not enough arguments
# fn foo x; end
# foo ''
ion: function takes 1 arguments, but you provided 0
```*Created by: aeosynth*
the empty string is not treated as a valid argument:
```
# touch a
# rename '' 0 a
rename: not enough arguments
# fn foo x; end
# foo ''
ion: function takes 1 arguments, but you provided 0
```https://gitlab.redox-os.org/redox-os/ion/-/issues/421Create Ion Wiki2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meCreate Ion WikiAs Ion nears completion, we should create some extensive documentation to cover all of Ion's features, behaviors, and implementation details so that users interested in gaining mastery of Ion know where everything is and how it works. Sh...As Ion nears completion, we should create some extensive documentation to cover all of Ion's features, behaviors, and implementation details so that users interested in gaining mastery of Ion know where everything is and how it works. Should also be available alongside Ion for offline viewing.https://gitlab.redox-os.org/redox-os/ion/-/issues/350unescaped quotes2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meunescaped quotes*Created by: aeosynth*
touch "a'b"
rm a<Tab> # rm a'b
same issue for double quotes*Created by: aeosynth*
touch "a'b"
rm a<Tab> # rm a'b
same issue for double quoteshttps://gitlab.redox-os.org/redox-os/ion/-/issues/417Remove Indentation When `end` Is Detected2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meRemove Indentation When `end` Is DetectedMay require some work on [liner](https://github.com/MovingtoMars/liner) to implement. See https://github.com/MovingtoMars/liner/issues/39May require some work on [liner](https://github.com/MovingtoMars/liner) to implement. See https://github.com/MovingtoMars/liner/issues/39https://gitlab.redox-os.org/redox-os/ion/-/issues/393Update version_check to 0.1.32018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meUpdate version_check to 0.1.3*Created by: z3ntu*
A bug (https://github.com/SergioBenitez/version_check/issues/1) in version_check was fixed in 0.1.3. See #394 for the pull request.*Created by: z3ntu*
A bug (https://github.com/SergioBenitez/version_check/issues/1) in version_check was fixed in 0.1.3. See #394 for the pull request.https://gitlab.redox-os.org/redox-os/ion/-/issues/390Path String Methods2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.mePath String MethodsPathname handling is a common activity in shell code, so we should promote them as first class methods. Rust will make this very easy to implement.
- $extension(filepath)
- $basename(filepath)
- $parent(filepath)
- $filename(filepath)Pathname handling is a common activity in shell code, so we should promote them as first class methods. Rust will make this very easy to implement.
- $extension(filepath)
- $basename(filepath)
- $parent(filepath)
- $filename(filepath)