aboutsummaryrefslogtreecommitdiff
path: root/src/cli.zig
diff options
context:
space:
mode:
authorGravatar jhmaster2000 <32803471+jhmaster2000@users.noreply.github.com> 2023-09-07 00:32:39 -0300
committerGravatar jhmaster2000 <32803471+jhmaster2000@users.noreply.github.com> 2023-09-07 00:32:39 -0300
commit7eba3229fe8ed0f7ef01adbc5435ee061ec705cd (patch)
treedaae6c21ae41f655555df2e38a8280845ea91a75 /src/cli.zig
parent5fe13cdaac984575311e2a3192e739e5d7850b26 (diff)
downloadbun-7eba3229fe8ed0f7ef01adbc5435ee061ec705cd.tar.gz
bun-7eba3229fe8ed0f7ef01adbc5435ee061ec705cd.tar.zst
bun-7eba3229fe8ed0f7ef01adbc5435ee061ec705cd.zip
initial bun repl revisionrepl
Diffstat (limited to 'src/cli.zig')
-rw-r--r--src/cli.zig10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cli.zig b/src/cli.zig
index c68297baa..82ca04228 100644
--- a/src/cli.zig
+++ b/src/cli.zig
@@ -1099,6 +1099,7 @@ pub const Command = struct {
RootCommandMatcher.case("link") => .LinkCommand,
RootCommandMatcher.case("unlink") => .UnlinkCommand,
RootCommandMatcher.case("x") => .BunxCommand,
+ RootCommandMatcher.case("repl") => .ReplCommand,
RootCommandMatcher.case("i"), RootCommandMatcher.case("install") => brk: {
for (args_iter.buf) |arg| {
@@ -1174,6 +1175,7 @@ pub const Command = struct {
const UpgradeCommand = @import("./cli/upgrade_command.zig").UpgradeCommand;
const BunxCommand = @import("./cli/bunx_command.zig").BunxCommand;
+ const ReplCommand = @import("./cli/repl_command.zig").ReplCommand;
if (comptime bun.fast_debug_build_mode) {
// _ = AddCommand;
@@ -1276,6 +1278,13 @@ pub const Command = struct {
try BunxCommand.exec(ctx);
return;
},
+ .ReplCommand => {
+ if (comptime bun.fast_debug_build_mode and bun.fast_debug_build_cmd != .ReplCommand) unreachable;
+ const ctx = try Command.Context.create(allocator, log, .ReplCommand);
+
+ try ReplCommand.exec(ctx);
+ return;
+ },
.RemoveCommand => {
if (comptime bun.fast_debug_build_mode and bun.fast_debug_build_cmd != .RemoveCommand) unreachable;
const ctx = try Command.Context.create(allocator, log, .RemoveCommand);
@@ -1641,6 +1650,7 @@ pub const Command = struct {
InstallCompletionsCommand,
LinkCommand,
PackageManagerCommand,
+ ReplCommand,
RemoveCommand,
RunCommand,
TestCommand,