- Oct 30, 2017
-
-
Michael Aaron Murphy authored
-
Michael Aaron Murphy authored
Process expansions are now being performed as an internal fork within the shell. Previously, this was done by passing executing a new Ion binary with a given command. Work is not 100% complete, however. There's some TODOs that label what's not done yet. - Quoting rules for process expansions has been fixed - However, we should investigate a performance optimization to eliminate heap allocations there. - At the moment, as with background shells, stdin within the child of the fork is disabled. Fix this. - And, we need to remove our pre-process expansion expansions.
-
- Oct 29, 2017
-
-
Michael Aaron Murphy authored
`which` builtin
-
Ian Douglas Scott authored
-
Michael Aaron Murphy authored
Closes #560 - !! expands to the last command - !$ expands to the last command's arguments
-
Michael Aaron Murphy authored
-
- Oct 28, 2017
-
-
Michael Aaron Murphy authored
-
Michael Aaron Murphy authored
-
Michael Aaron Murphy authored
-
Michael Aaron Murphy authored
Severely trims down on LOC for performing assignments.
-
- Oct 27, 2017
-
-
Michael Aaron Murphy authored
-
Michael Aaron Murphy authored
-
Michael Aaron Murphy authored
-
Michael Aaron Murphy authored
-
Michael Aaron Murphy authored
-
Michael Aaron Murphy authored
Rather than returning raw fds, we will return Files
-
Add multiple redirections, that is, support for things like: ``` cmd <file1 <file2 ^>> err-log > output | cmd2 ``` In current ion this doesn't work. This change at current would be breaking as the statement: ``` tr 'x' 'y' | tr 'y' 'z' < file > file2 ``` redirects `file` to the first `tr` command. With this change, we would redirect it to the second. ## Overview We treat a multiple redirection as it's own job. The only difference between these jobs and normal jobs is that they only read from their source(s) and then write to their sink(s). ### Parsing Alter `Pipline` contain a vector of `PipeItem`s. A `PipeItem` consists of a `Job`, a `Vec<Redirection>` and a `Vec<Input>`. The above statement would be parsed into two items, `cmd` together with `[file1, file2]` as input and `[err-log, output]` as outputs, and `cmd2` with no `Input`s or `Redirection`s ### Command Generation and Redirection Setup Added two two new variants of `RefinedJob`, `Cat` and `Tee`, `Cat` for concatenating multiple inputs, `Tee` for splitting multiple outputs. Alter the `generate_commands` function to return a `Vec<(RefinedJob, JobKind, Vec<Redirection>, Vec<Input>)>`, then condense `redirect_input` and `redirect_output` into one function that takes ownership and returns a new `Vec<(RefinedJob, JobKind)>`. It is here that we create the `Tee` and `Cat` jobs that we need and put them in the right spot in the pipeline. ### Execution Add `exec_multi_in` and `exec_multi_out` to handle the multiple redirections. These are fairly straightforward, they just read their sources and write to their sinks. I didn't add any extra paths to `exec_job` as the new `RefinedJob` kinds are always part of a pipeline.
-
- Oct 26, 2017
-
-
Michael Aaron Murphy authored
Closes #558
-
Michael Aaron Murphy authored
Closes #547 This will remove all dependency upon the nix crate, as we will be using `libc` directly for the `waitpid` functionality on *nix systems. This should also make it easier to integrate with Redox.
-
Michael Aaron Murphy authored
-
Michael Aaron Murphy authored
Rather than using AtomicUsize and AtomicBool fields within our ForegroundSignals structure, I'm switching this over to using AtomicU32 and AtomicU8 values instead.
-
Michael Aaron Murphy authored
Closes #557
-
Michael Aaron Murphy authored
Closes #554
-
- Oct 20, 2017
-
-
- Oct 13, 2017
-
-
Michael Aaron Murphy authored
-
Michael Aaron Murphy authored
-
Michael Aaron Murphy authored
-
Michael Aaron Murphy authored
-
Michael Aaron Murphy authored
With this change, the following is now valid syntax: let array = [ one two three # a comment four # another comment ] echo $join(array, "\n")
-
- Oct 12, 2017
-
-
Michael Aaron Murphy authored
-
Michael Aaron Murphy authored
Since we are depending on Nightly, we may as well utilize the impl trait return type feature that should help us to avoid some heap allocations when getting a list of variables in the shell.
-
Michael Aaron Murphy authored
After the refactoring of how let and other builtins were parsed, we lost the ability to get a list of local variables just by supplying the let command without any arguments. This will re-implement that ability.
-
Michael Aaron Murphy authored
Liner seems to be doing some very limited form of multi-line comment support, itself. This change will strip out the excess characters that are returned by liner.
-
Michael Aaron Murphy authored
Update variables for commands that start with ~, too Closes #551
-
Michael Aaron Murphy authored
A bit of refactoring to make handling method arguments simpler.
-
Jeremy Soller authored
-
- Oct 11, 2017
-
-
Michael Aaron Murphy authored
-
- Oct 10, 2017
-
-
Michael Aaron Murphy authored
-