c6a972c76b
refactor(parser): small improvements
...
Acked-by: ElKowar
Signed-off-by: Charlotte Meyer <dev@buffet.sh>
2022-11-06 22:41:06 +00:00
f215335627
refactor(parser): get rid of tailcall in favor of chain
...
Signed-off-by: Charlotte Meyer <dev@buffet.sh>
2022-11-06 19:25:16 +00:00
4a9d49fbd8
fix(runtime tests): treat write's better
...
- unwrap on writeln!()
- make sure "all" [0] is written in capture
Signed-off-by: Charlotte Meyer <dev@buffet.sh>
2022-11-05 16:21:34 +00:00
87b911183c
style(tests): fix indentation in expect blocks
...
Signed-off-by: Charlotte Meyer <dev@buffet.sh>
2022-11-05 13:32:38 +00:00
5e18e89af4
feat(builtins): add basic math builtins
...
This adds basic addition, substraction, multiplication, and division
commands as builtins.
All of those operate solely on f64's.
Signed-off-by: Charlotte Meyer <dev@buffet.sh>
2022-11-05 13:22:33 +00:00
ac8a22ad99
refactor(runtime tests): split off builtin tests
...
Signed-off-by: Charlotte Meyer <dev@buffet.sh>
2022-11-02 15:41:01 +00:00
e1fcd94ef1
fix(builtin-proc): enable missing syn features
...
Signed-off-by: Charlotte Meyer <dev@buffet.sh>
2022-11-01 15:16:06 +00:00
54cddfa562
fix(runtime): explicitly use carrot in version spec
2022-10-31 10:38:05 +00:00
f0f0d4e626
feat: add cargo deny config
...
Also make code compliant.
Signed-off-by: Charlotte Meyer <dev@buffet.sh>
2022-10-29 12:41:08 +00:00
a88a163273
refactor(tests): use expect-test rather than insta
...
insta doesn't support having a single check function with all the
duplicated code.
Acked-by: ElKowar
Signed-off-by: Charlotte Meyer <dev@buffet.sh>
2022-10-28 08:12:26 +00:00
fbba44312f
fix(lexer): fix inproper handling of \\\n
...
Before it would escape the newline resulting in passing it as an
argument.
Signed-off-by: Charlotte Meyer <dev@buffet.sh>
2022-10-28 08:12:26 +00:00
aeb61873c1
feat(runtime): add missing doc comments on Shell
...
Signed-off-by: Charlotte Meyer <dev@buffet.sh>
2022-10-28 08:12:26 +00:00
c0e5aa2308
feat(builtins): add exit builtin
...
Signed-off-by: Charlotte Meyer <dev@buffet.sh>
2022-10-28 08:12:26 +00:00
c3bcdf5cd8
feat(builtins): add nofork on builtins
...
Signed-off-by: Charlotte Meyer <dev@buffet.sh>
2022-10-28 08:12:26 +00:00
a5d971de35
fix(pipeline): use OsString in tests
...
Signed-off-by: Charlotte Meyer <dev@buffet.sh>
2022-10-28 08:12:26 +00:00
eb78097206
fix(builtins): make help pub
...
Acked-by: cpli <dev@cpli.in>
Signed-off-by: Charlotte Meyer <dev@buffet.sh>
2022-10-28 08:12:25 +00:00
1bc2113f70
refactor(runtime): make use of nix::Error consistent
...
Reviewed-by: cpli <dev@cpli.in>
Reviewed-by: ElKowar
Signed-off-by: Charlotte Meyer <dev@buffet.sh>
2022-10-28 08:12:25 +00:00
6cd36a5ec5
fix(runtime): fix typo in waidpid
...
Reviewed-by: ElKowar
2022-10-28 08:12:25 +00:00
4e1a835ddc
feat: add command substitutions with ()
...
This requires PreparedCommand's to work with OsStrings rather than
Strings.
Acked-by: cpli
Acked-by: ElKowar
2022-10-28 08:12:25 +00:00
65b50557c9
chore: add licenses
2022-10-28 08:12:25 +00:00
23f69a33e5
feat(builtins): use proc macro for builtins
2022-10-28 08:12:25 +00:00
bd23c3e40d
fix: remove unneeded derives
2022-10-23 14:32:29 +00:00
2969d85f5e
fix(runtime): use unwrap not expect for unreachable code
...
cpli says to "make illegal states unrepresentable"
Acked-by: cpli
2022-10-23 14:32:29 +00:00
092360bce6
feat(runtime): implement builtins, add help
2022-10-23 14:32:28 +00:00
6c759e57cc
fix(runtime): set fg pgrp in all children
...
Before there was a race condition, where it relied on the scheduler
running the first child first.
2022-10-10 20:32:09 +00:00
f0e15804b4
refactor(runtime): don't use From<ref>
...
"the great thing about From is that you can from into from into from
into from into and it's still the same. don't do that"
Acked-by: cpli
2022-10-10 17:52:16 +00:00
fe3d05d36b
fix(runtime): reset signal handlers in children
...
Ignored signals do not get reset on exec.
This allows children to properly suspend when needed.
2022-10-01 13:29:15 +00:00
78593f1667
feat(parser): parse double quoted strings
2022-10-01 13:29:15 +00:00
c1881bb7b2
feat(runtime): kill existing processes on error
2022-09-25 12:36:08 +00:00
924a7462bd
fix(runtime): grab terminal even if error occured
2022-09-25 12:36:08 +00:00
f0698457ed
feat(runtime): set foreground job properly
2022-09-25 12:36:08 +00:00
0bfa8b3c8f
feat(runtime): add basic runtime
2022-09-24 12:42:59 +00:00
a271fb2301
feat(lineedit): add very basic readline
2022-09-20 12:03:32 +00:00
02f19d91ee
feat(parser): implement parser
2022-09-15 21:20:26 +00:00